mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: add 'Vary: Origin' header to cors response
This commit is contained in:
		
							parent
							
								
									7d40ded3c3
								
							
						
					
					
						commit
						abf540a1cc
					
				| @ -7,6 +7,7 @@ export const conditionalMiddleware = ( | |||||||
|     const router = Router(); |     const router = Router(); | ||||||
| 
 | 
 | ||||||
|     router.use((req, res, next) => { |     router.use((req, res, next) => { | ||||||
|  |         res.setHeader('Vary', 'Origin'); | ||||||
|         if (condition()) { |         if (condition()) { | ||||||
|             middleware(req, res, next); |             middleware(req, res, next); | ||||||
|         } else { |         } else { | ||||||
|  | |||||||
| @ -76,6 +76,7 @@ const secureHeaders: (config: IUnleashConfig) => RequestHandler = (config) => { | |||||||
|                 }, |                 }, | ||||||
|             }, |             }, | ||||||
|             crossOriginEmbedderPolicy: false, |             crossOriginEmbedderPolicy: false, | ||||||
|  |             originAgentCluster: false, | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
|     return (req, res, next) => { |     return (req, res, next) => { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user