From 1849efe722f6c31e952319fe5d1c5d90d37be62e Mon Sep 17 00:00:00 2001 From: nutra-bot Date: Sat, 22 Apr 2023 17:54:15 +0000 Subject: [PATCH] enable HSTS on api server --- etc/nginx/conf.d/default.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/nginx/conf.d/default.conf b/etc/nginx/conf.d/default.conf index 8efb6a6..12f5404 100644 --- a/etc/nginx/conf.d/default.conf +++ b/etc/nginx/conf.d/default.conf @@ -11,7 +11,8 @@ server { server_name api-dev.nutra.tk api.dev.nutra.tk; #listen 80; listen 443 ssl http2; - resolver 127.0.0.1; + # HSTS + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; # Sanic location / { -- 2.52.0