mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: proxy api check (#1965)
* fix: proxy api check * fix: add await * fix: revert async setup for prehook * fix: stricter endpoint checks
This commit is contained in:
		
							parent
							
								
									12cf71a7cb
								
							
						
					
					
						commit
						1821bb881a
					
				| @ -7,7 +7,18 @@ const isClientApi = ({ path }) => { | |||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| const isProxyApi = ({ path }) => { | const isProxyApi = ({ path }) => { | ||||||
|     return path && path.startsWith('/api/frontend'); |     if (!path) { | ||||||
|  |         return; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     // Handle all our current proxy paths which will redirect to the new
 | ||||||
|  |     // embedded proxy endpoint
 | ||||||
|  |     return ( | ||||||
|  |         path.startsWith('/api/default/proxy') || | ||||||
|  |         path.startsWith('/api/development/proxy') || | ||||||
|  |         path.startsWith('/api/production/proxy') || | ||||||
|  |         path.startsWith('/api/frontend') | ||||||
|  |     ); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| export const TOKEN_TYPE_ERROR_MESSAGE = | export const TOKEN_TYPE_ERROR_MESSAGE = | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user