mirror of
https://github.com/ThisIsBenny/wishlist-app.git
synced 2025-06-07 05:57:41 +00:00
CORS header rule adjusted
Signed-off-by: Benny Samir Hierl <bennysamir@posteo.de>
This commit is contained in:
parent
aeff0dd6f0
commit
50a201d6dc
1 changed files with 4 additions and 1 deletions
|
@ -16,7 +16,10 @@ export default async (opts: FastifyContextConfig = {}) => {
|
|||
})
|
||||
|
||||
await app.register(cors, {
|
||||
origin: true,
|
||||
origin:
|
||||
process.env.NODE_ENV === 'development'
|
||||
? /https?:\/\/localhost(:\d+)?/
|
||||
: false,
|
||||
})
|
||||
|
||||
await app.register(compress)
|
||||
|
|
Loading…
Add table
Reference in a new issue