Hello there,
I’m using Nginx as a proxy for my NodeJS app. When I enter http://staging.app.zulutek.com
it is secure. Now the problem is, when this app loads, first action on Angular is to redirect to a path /discoverer
. When it redirects the app is not secure anymore - red https sign on Chrome.
I tested the app url via SSLLabs (both ‘/’ and ‘/discoverer’) and everything seems to be working fine.
Inside ‘/discoverer’ and other urls, whatever external resources I’m loading, they’re loaded over HTTPS - some of them are self-signed. No HTTP errors, everything loads just fine.
The resources, which are loaded over self-signed HTTPS, are loaded from a device, REST’ing on an IP.
To test, I disabled every single external request on ‘/discoverer’ , except css files, yet problem still persisted.
How can I debug the problem? Where to look? Has anyone had this kind of problem?
Here is my Nginx config:
upstream app {
server 127.0.0.1:9090;
}
server {
listen 80;
server_name staging.app.zulutek.com;
access_log /var/log/nginx/app.log;
add_header Strict-Transport-Security max-age=63072000;
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_cache_bypass $http_upgrade;
proxy_pass http://app;
proxy_redirect off;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/staging.api.zulutek.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/staging.api.zulutek.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
}
Thank you very much.