Automatically Standardizing HTTPS Access in Nginx

1 min

language: ja bn en es hi pt ru zh-cn zh-tw

I'm connecting VPS (nginx) <—> home server (Devuan), but the site experiences problems because it can also be accessed via http, so I'm looking for a solution.

Simply add the following to the location block.

*/nginx.conf

add_header Content-Security-Policy upgrade-insecure-requests;

With just this, HTTPS will be standardized.

Related Posts