Open mmaeffert opened 1 year ago
It just occured to me that pdf.min.js is never properly loaded and the GET request never receives an answer. Neither the nginx or the app container throw any error messages and the file in question has 777 permission granted by me. Manually executing the GET request is successful. Furthermore I found the following error:
I also do not know why the file is requested via HTTP. When I change the env to REQUIRE_HTTPS=true
, nothing works anymore.
In case it is needed, this is my Proxy Configuration:
<VirtualHost *:80>
ServerName placeholder.de
ProxyPreserveHost On
ProxyRequests Off
ServerAlias www.placeholder.de
Redirect permanent / https://placeholder.de
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName placeholder.de
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://localhost:8001/
ProxyPassReverse / http://localhost:8001/
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/placeholder.de/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/placeholder.de/privkey.pem
</VirtualHost>
</IfModule>
Allowing unsafe content and removing the redirection onto HTTPS, I now do not receive any error messages anymore.
I also ask myself why the file is requested via HTTP, instead of HTTPS, when the env variable is set accordingly.
Now when I create an invoice, the preview is working fine. But when looking at the PDF later, it is just blank:
Same result when downloading and opening seperately
I'm facing the same problem. pdf.min.js
is blocked because it is requested on http
instead of https
. I'm using the helm chart, with Caddy running reverse_proxy to it.
The PDF is created fine, and gets attached to the email just fine, but I can't view the PDF from within IN. I'm assuming the client portal has the same problem.
How I migrated
services: server: image: nginx restart: always env_file: env volumes:
"in5.localhost:192.168.0.124 " #host and ip
app: image: invoiceninja/invoiceninja:5 env_file: env restart: always volumes:
./config/php/php-cli.ini:/usr/local/etc/php/php-cli.ini
depends_on:
./docker/mysql/data:/var/lib/mysql:rw,delegated
networks:
networks: invoiceninja:
IN application vars
APP_URL=http://placeholder.de APP_KEY=xxxxxxx APP_DEBUG=true REQUIRE_HTTPS=false PHANTOMJS_PDF_GENERATION=true PDF_GENERATOR=snappdf TRUSTED_PROXIES='*'
QUEUE_CONNECTION=database ...