Open KondakovVE opened 1 week ago
Hey @KondakovVE, please ensure your external proxy server is configured to set the following headers for proxied requests:
# Set headers for proxied request
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_http_version 1.1;
Is there an existing issue for this?
Current behavior
Good afternoon. I found the following problem when deploying the self-hosted server
If you use an external NGINX server for the container, there is a problem when post attachments.
As a result of analysis and debugging, it was possible to establish that the reason is in the function apiserver.plane.settings.storage.S3Storage.init
The problem is that when initializing boto3.client, the request.scheme field is passed as the url - that is, the value for nginx will be http and the generated http link is passed to the client for the subsequent method call with the attachment download. But there will be an error (so the site was opened in the user's browser using an https link)
for myself, I just explicitly prescribed the https protocol, but I think it makes sense to introduce some kind of USE_PROXY environment variable that will allow you to work it out correctly
Steps to reproduce
git clone https://github.com/makeplane/plane.git ./setup.sh
then comment service proxy and make config for external nginx
Environment
Production
Browser
Google Chrome
Variant
Self-hosted
Version
0.23.1