You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have Codex running behind a reverse proxy as a subdomain. For this example it is https://codex.mysite.com.
I can log in, however when I try to run admin tasks, I get the following error in the Last Task Queued:
CSRF Failed: Origin checking failed - https://codex.mysite.com does not match any trusted origins.
Here is my nginx config:
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name codex.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
proxy_set_header X-Scheme $scheme;
set $upstream_app 192.168.2.99;
set $upstream_port 6066;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
# Codex reads http basic authentication.
# If the nginx credentials are different than codex credentials use this line to
# not forward the authorization.
#proxy_set_header Authorization "";
}
}
Your port number is weird, but i assume that's actually fine and you know what you're doing.
I wondered if using a wildcard server name might work strangely with nginx and i found this
But i think what i would do is first try using a blank a slate nginx config that nearly exactly matches the one on the codex README and if that works, try adding your own preferred headers back into it a controlled block at a time to see if that's where the issue might be.
I have Codex running behind a reverse proxy as a subdomain. For this example it is https://codex.mysite.com.
I can log in, however when I try to run admin tasks, I get the following error in the Last Task Queued:
CSRF Failed: Origin checking failed - https://codex.mysite.com does not match any trusted origins.
Here is my nginx config:
Contents in proxy.conf:
A quick Google says I need CSRF_TRUSTED_ORIGINS set somewhere, but passing it through the Docker instance doesn't make any difference.
The text was updated successfully, but these errors were encountered: