Setting up sentry for a next.js project works in localhost but not when it's served via nginx #10140
-
I have set up Sentry through the next js wizard as described here. When unhandled errors happen in the sandboxed npm dev server in localhost the integration works: I am able to see the events in the Sentry UI. But when I serve the same app (only static content) through nginx then I get a 405 error in the browser's console when POSTing to https://{host}/monitoring?o={number}&p={number}. This leads me to wonder whether there should be extra configuration in my nginx.conf file. The wizard produces the following 3 files: sentry.client.config.ts, sentry.edge.config.ts and sentry.server.config.ts. All of them have default values ( I've changed nothing ) I am using a self hosted Sentry server, not the SaaS solution |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
When using the Next.js wizard we set up a The
|
Beta Was this translation helpful? Give feedback.
-
Thanks a ton @AbhiPrasad! That did it |
Beta Was this translation helpful? Give feedback.
When using the Next.js wizard we set up a
tunnelRoute
for you. This adds an API endpoint to your application that is used to forward Sentry events to the Sentry servers.The
tunnelRoute
option does currently not work with self-hosted Sentry instances, so I recommend you remove thetunnelRoute
option from your next config.