fix(demo): Get CORS proxy to work in Chrome on Windows (#2220)

This commit is contained in:
ayame113 2022-12-29 23:43:52 +09:00 committed by GitHub
parent 12be1bc5ff
commit 1597bae403
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ class DemoApp extends React.Component<
let proxiedUrl = specUrl; let proxiedUrl = specUrl;
if (specUrl !== DEFAULT_SPEC) { if (specUrl !== DEFAULT_SPEC) {
proxiedUrl = cors proxiedUrl = cors
? '\\\\cors.redoc.ly/' + new URL(specUrl, window.location.href).href ? 'https://cors.redoc.ly/' + new URL(specUrl, window.location.href).href
: specUrl; : specUrl;
} }
return ( return (