docusealco / docuseal

Open source DocuSign alternative. Create, fill, and sign digital documents ✍️
https://www.docuseal.co
GNU Affero General Public License v3.0
5.97k stars 410 forks source link

Add Documentation for non-caddy configuration #75

Closed concurrent-recursion closed 1 year ago

concurrent-recursion commented 1 year ago

If the user is deploying docuseal behind an existing reverse proxy (nginx) there are certain headers that need to be set in order for the application to correctly function.

If the headers are not present the user will receive a 422 error page, and will see the following in the logs ActionController::InvalidAuthenticityToken (HTTP Origin header (https://docuseal.mydomain.com) didn't match request.base_url (http://docuseal.mydomain.com)):

For nginx the following configuration is required in order for CORs to function properly.

location /{
    proxy_pass http://yourdocuseal.internal.hostname:3000/;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Host $host;
}
AlexandrToorchyn commented 1 year ago

@concurrent-recursion Added to the wiki. Thanks.