After fighting with sentry when installing it on openshift i got it up and running only to discover that when sending an event to my server it will throw this error:
12:30:59 [WARNING] django.request: Forbidden (CSRF cookie not set.): /api/1/envelope/ (status_code=403 request=<WSGIRequest: POST u'/api/1/envelope/'>) 10.125.2.1 - - [20/Jul/2020:12:30:59 +0000] "POST /api/1/envelope/ HTTP/1.1" 403 6059 "-" "sentry.native/0.3.4"
If I send a curl request to the API i get a neat HTML webpage that shows the csrf error. Anyone got an idea what might be the problem here?
Invalid or missing CSRF token This error message means that your browser couldn't create a secure cookie, or couldn't access that cookie to authorize your login. This can be caused by ad- or script-blocking plugins, but also by the browser itself if it's not allowed to set cookies.
Open Safari Preferences from the drop-down menu in the navigation bar or by typing Cmd + , (⌘,). Click the Privacy tab and make sure that "Cookies and website data" is set to either "Always allow" or "Allow from websites I visit".
It remains valid for 24 hours.
Proxy /api/
to sentry relay worker. Relevant part from https://github.com/getsentry/onpremise/blob/master/nginx/nginx.conf
upstream relay { server relay:3000; }
upstream sentry { server web:9000; }
server {
location /api/store/ { proxy_pass http://relay; }
location ~ ^/api/[1-9]\d*/ { proxy_pass http://relay; }
location / { proxy_pass http://sentry; }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With