I began to master Grist and faced the problem getAdminConfig called on non-admin page, when tried to fill the email field in the welcome page and pressed the “continue” button. The grist service ran via a docker container with
sudo docker run -e APP_HOME_URL=“https://grist.my.site” -e GRIST_ADMIN_EMAIL="grist@mail.com" --env PORT=8763 -p 8763:8763 -v /path/to/grist/folder:/persist -it gristlabs/grist-oss
Also I used nginx as reserve proxy and input the minimum necessary configuration as in Self-hosted Grist - Grist Help Center :
server {
server_name grist.my.site;
listen 80;
listen [::]:80;
return 301 https://$http_host$request_uri;
}
server {
server_name grist.my.site;
listen 443 ssl;
ssl_certificate cert.pem;
ssl_certificate_key key.pem;
ssl_protocols TLSv1.3;
include /etc/nginx/mime.types;
root /path/to/grist/folder;
add_header X-Frame-Options "DENY";
add_header Content-Security-Policy "script-src 'self' https://trusted.cdn.com https://cdn.jsdelivr.net;";
add_header X-XSS-Protection "1; mode=block";
add_header Strict-Transport-Security "max-age=63072000" always;
location / { # Grist service setup
proxy_pass http://localhost:8763;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Above this snippet is another but similar one for my website (it also forwards http requests to https). Such implemantation of TSL for grist service works and the welcome page opens with https. But I cannot continue to finish setup due to that error. Search and AI haven’t provided an answer yet.