aboutsummaryrefslogtreecommitdiff
path: root/nginx-example.conf
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2021-06-24 13:53:58 +0100
committerMiquel Lionel <lionelmiquel@sfr.fr>2021-07-02 01:21:59 +0100
commitde854ac0a8fe72a1b0d0137c351b39de25e0adfe (patch)
treeae1386ade7ebb65e2b269347b09c8ced87fb614f /nginx-example.conf
parent420155e750c4b95dd4327d7adb4310a64eafb364 (diff)
downloadgpigeon-de854ac0a8fe72a1b0d0137c351b39de25e0adfe.tar.gz
gpigeon-de854ac0a8fe72a1b0d0137c351b39de25e0adfe.zip
Implemented very basic multi-user support
- the `gpigeonctl' script is used to initialize the database, add an user and delete it, clear cookies. More info in the readme about it. - tweaked gpigeon-template.cgi and link-template-tmpl.cgi to support multiusers - tweaked the Makefile - tweaked the config.def.mk and added WWWUSER and WWWDIR variables - made some ajustements in the styles.css file for responsivity. - added some headers for security in nginx-example.conf - added gpigeonctl.def which serves as a "blueprint" for gpigeonctl
Diffstat (limited to 'nginx-example.conf')
-rw-r--r--nginx-example.conf6
1 files changed, 6 insertions, 0 deletions
diff --git a/nginx-example.conf b/nginx-example.conf
index 97e5027..f3d9252 100644
--- a/nginx-example.conf
+++ b/nginx-example.conf
@@ -30,5 +30,11 @@ server {
fastcgi_pass unix:/run/fcgiwrap.sock;
include /etc/nginx/fastcgi_params;
}
+
+ add_header Strict-Transport-Security "max-age=63072000; preload";
+ add_header Content-Security-Policy "default-src 'self'";
+ add_header X-Frame-Options DENY;
+ add_header Access-Control-Allow-Origin https://$server_name;
+ add_header Vary Origin; # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin#cors_and_caching
}