1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: CORS options path (#2165)

* fix: path

* fix: path typo
This commit is contained in:
Fredrik Strand Oseberg 2022-10-11 09:20:29 +02:00 committed by GitHub
parent 14b802668c
commit b341018b1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ export default async function getApp(
// Preflight requests should not have Authorization headers,
// so this must be handled before the API token middleware.
app.options(
'/api/frontend*',
`${baseUriPath}/api/frontend*`,
conditionalMiddleware(
() => config.flagResolver.isEnabled('embedProxy'),
corsOriginMiddleware(services),

View File

@ -15,7 +15,7 @@ const isProxyApi = ({ path }) => {
// Handle all our current proxy paths which will redirect to the new
// embedded proxy endpoint
return (
path.startsWith('/api/default/proxy') ||
path.startsWith('/api/proxy') ||
path.startsWith('/api/development/proxy') ||
path.startsWith('/api/production/proxy') ||
path.startsWith('/api/frontend')