-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Tunnel Routing Frontend Errors Results in 404 on Cloudflare CDN #16128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello, how does your tunnel redirection endpoint look like on the server? Can you provide a small reproduction example? |
Also relevant:
|
Thanks for responding so fast! We have Middleware in place but the matcher excludes /api paths: The DSN is structured as follows: https://{ 32 digit string }@o{ Organization ID }.ingest.us.sentry.io/{ Project ID } Here are the Request Headers: ![]() |
Thanks for providing the additional information. Since the problem only occurs in the staging environment with Cloudflare it could be that the DSN is not properly forwarded in Cloudflare. You could check if there are any Web Application Firewall rules that might block of modify API requests, any Transform Rules or any other security settings that might strip certain headers. And can you please also share your tunnel route endpoint? |
We ran a trace request on Cloudflare and found that no rules were matched. |
@s1gr1d the I think whatever you're using to deploy on cloudflare doesn't support Next.js rewrites which the Sentry SDK's |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
9.14.0
Framework Version
next 14.2.5
Link to Sentry event
No response
Reproduction Example/SDK Setup
Here is the Sentry build config:
Here is the instrumentation Sentry config:
Steps to Reproduce
Expected Result
Actual Result
With Tunnel Route Config
The development environment sends the tunnel routed post request and received a 200 response:
Dev Response Body
The staging environment sends the tunnel routed post request and receives a 400 response:
Staging Response Body
The DSN's are not changed based on the environment and they are identical in the request payloads.
Without Tunnel Route Config
Both environments function as expected and are identical in their behaviour. The both send a POST request to a sentry.io address and errors are logged correctly in Sentry.
The text was updated successfully, but these errors were encountered: