Nginx Proxy config for realtime #5122
Replies: 2 comments
-
The example config from the docs works when testing locally for me.
PocketBase allows all origins ( You could also try to open the browser inspect tool, navigate to the Network tab and paste/inspect the failed request(s). |
Beta Was this translation helpful? Give feedback.
-
The JS SDK is using the url: 'https://admin.domain.me' , https://stackoverflow.com/questions/75360904/cant-get-pocketbase-running-behind-ngnix-as-a-reverse-proxy #488 I added a location in the nginx conf for api/realtime which has a proxy pass inside and the cors header. |
Beta Was this translation helpful? Give feedback.
-
Hi iam currently working on a little project where i want to use the realtime api for updating a card.
My Project has on Instance running from Pocketbase behind a nginx proxy.
I used the Config from https://pocketbase.io/docs/going-to-production/, but there i getting a CORS error for realtime requests.
CORS-Anfrage schlug fehl). Statuscode: (null).
When iam opening the url with my browser it downloads a file.
Is there anything missing in the production example ?
Realtime doesnt work, anything else is working.
`
server {
server_name admin.domain.me;
}
server {
if ($host = admin.domain.me) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
`
Beta Was this translation helpful? Give feedback.
All reactions