Skip to content

Commit

Permalink
fix(cors): allow sentry headers (#3272)
Browse files Browse the repository at this point in the history
## Changes

- Fix CORS issue caused by Sentry
I fixed the regex to propagate sentry headers so naturally it cascaded
into another error :D

https://docs.sentry.io/platforms/javascript/guides/react/tracing/trace-propagation/dealing-with-cors-issues/
  • Loading branch information
bodinsamuel authored Jan 9, 2025
1 parent f68ebf1 commit 0a94cf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server/lib/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const publicAPICorsHandler = cors({
maxAge: 600,
exposedHeaders: 'Authorization, Etag, Content-Type, Content-Length, X-Nango-Signature, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset',
allowedHeaders:
'Authorization, Content-Type, Accept, Origin, X-Requested-With, Nango-Activity-Log-Id, Nango-Is-Dry-Run, Nango-Is-Sync, Provider-Config-Key, Connection-Id',
'Authorization, Content-Type, Accept, Origin, X-Requested-With, Nango-Activity-Log-Id, Nango-Is-Dry-Run, Nango-Is-Sync, Provider-Config-Key, Connection-Id, Sentry-Trace, Baggage',
origin: '*'
});
publicAPI.use(publicAPICorsHandler);
Expand Down

0 comments on commit 0a94cf1

Please sign in to comment.