Hi,
I have a question which is a bit in the grayzone between bryntum and nginx, so I am not sure if this forum is the right place.
We have a setup, where our app using Bryntum Scheduler, and the PDF Exporter, are in 2 separate Docker containers.
Both are proxied by a Nginx server
The application is served behind https://my_domain/
(proxying https://localhost:8000, the app)
The pdf-exporter is served behind https://my_domain/pdf-exporter
(proxying https://localhost:9080, the pdf exporter)
location /pdf-exporter/ {
proxy_pass https://localhost:9080/;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;
proxy_pass https://localhost:8000/;
}
When the browser requests a pdf, the pdf exporter runs correctly (as I saw it in its log), but the returned URL is incorrect, as it points to 'https://localhost:9080/my_file.pdf' (pdf exporter URL after nginx), rather than 'https://my_domain/pdf-exporter/my_file.pdf'
In the PDF exporter I can find that the pdf file URL is built like the following:
url : me.setFile(req.protocol + '://' + req.get('host') + req.originalUrl, request, file)
However it is unclear to me which headers can/should be passed by Nginx, or if this snippet should be tweaked, to make the pdf exporter answers a correct url.
Thanks in advance for your help