Unable to preview a PDF report

Problem: User preview cannot preview PDF files properly.

Cause: When NginX is used as a proxy to forward requests, you need to modify the header of the request in the forwarding rule to preview the PDF file in Chrome.

Solution: Add the following configuration to the NginX configuration

proxy_hide_header X-Frame-Options;
add_header X-Frame-Options SAMEORIGIN always;
Copy the code

Loaded files [CSS, js, img] etc are too large

Problem: When users enter the page initially, they find that the size of the loaded file is too large, especially the network transmission size is similar to the original size of the file.

Cause: Compression configuration in Nginx is not enabled.

Solution: Configure gZIP in the NginX configuration

gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;
Copy the code

Finally, the following message appears in the request header:

Auth requests to report unable to verify the first certificate

Symptom: The login fails, and the public_key interface fails to obtain the token.

Error: Unable to verify the first certificate in nodejs is reported when NginX forwards the request as a proxy.

Solution: Add NODE_TLS_REJECT_UNAUTHORIZED=0 to the startup parameter and modify the startup script

Reference links: stackoverflow.com/questions/3…

NODE_TLS_REJECT_UNAUTHORIZED = 0
Copy the code

[‘Callback must be a function’]

If the following error message is encountered during deployment, Callback must be a function.Cause: Currently, Bluesea requires Nodejs version 8.11.1-8.12.0.

Wiki.alphaliongroup.com/link/224#bk…

Solutions:

  • You need to configure an 8.x Nodejs configuration in the Jenkins -> configureTools Nodejs section.

  • Go to configure for the project and find Build Environment > Provide Node & NPM bin/ Folder to PATH.

Certificate expired

Sudo certbot renew sudo certbot renew sudo certbot renew

If an error occurs and the renew is not successfully renewed, then you need to go to the console, temporarily open all ports 80 and 443 on the nginx host, and then execute sudo certbot renew. After success, the opened ports 80 and 443 will be closed

The login page does not have an encrypted password

Problem: After the deployment, the back-end Auth service has no problem, but the front-end service cannot obtain the public key, prompting 404, and the login page does not have an encrypted password.

Cause: The localhost in the configured AUth URL uses HTTPS

Solutions:

  1. Change all configuration involving localhost to HTTP instead of HTTPS.