2
0
mirror of https://github.com/offen/website.git synced 2024-11-26 02:40:26 +01:00

Merge pull request #9 from offen/rp-setting

Leverage reverse proxy setting in offen server
This commit is contained in:
Frederik Ring 2019-10-25 15:51:50 +02:00 committed by GitHub
commit 7b81ab9865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 16 deletions

View File

@ -30,10 +30,13 @@
},
{
"name": "server",
"image": "offen/offen@sha256:fe55ba1c183eb8bb4dd19143e6fe1133d6d3b9115c94cc2150620b27adef18fc",
"image": "offen/offen@sha256:4c0d2d5db9bc749d21ad8659008658bf25318074b7c813b0a694e64816df750d",
"essential": true,
"memory": 256,
"command": ["serve"]
"command": ["serve"],
"environment": {
"OFFEN_SERVER_REVERSEPROXY": "1"
}
},
{
"name": "logspout",

View File

@ -23,10 +23,13 @@
},
{
"name": "server",
"image": "offen/offen@sha256:fe55ba1c183eb8bb4dd19143e6fe1133d6d3b9115c94cc2150620b27adef18fc",
"image": "offen/offen@sha256:4c0d2d5db9bc749d21ad8659008658bf25318074b7c813b0a694e64816df750d",
"essential": true,
"memory": 256,
"command": ["serve"]
"command": ["serve"],
"environment": {
"OFFEN_SERVER_REVERSEPROXY": "1"
}
}
]
}

View File

@ -28,15 +28,10 @@ http {
autoindex on;
root /www/data;
expires $expires;
proxy_hide_header Content-Security-Policy;
add_header Content-Security-Policy $csp;
proxy_hide_header Strict-Transport-Security;
add_header Strict-Transport-Security 'max-age=604800; includeSubDomains';
proxy_hide_header Referrer-Policy;
add_header Referrer-Policy 'origin-when-cross-origin';
proxy_hide_header X-Content-Type-Options;
add_header X-Content-Type-Options 'nosniff';
proxy_hide_header X-XSS-Protection;
add_header X-XSS-Protection '1; mode=block';
location /api/ {

View File

@ -12,7 +12,7 @@ services:
- server
server:
image: offen/offen@sha256:fe55ba1c183eb8bb4dd19143e6fe1133d6d3b9115c94cc2150620b27adef18fc
image: offen/offen@sha256:4c0d2d5db9bc749d21ad8659008658bf25318074b7c813b0a694e64816df750d
command: serve
volumes:
- ./bootstrap.yml:/bootstrap.yml
@ -23,6 +23,7 @@ services:
OFFEN_APP_DISABLESECURECOOKIE: '1'
OFFEN_DATABASE_CONNECTIONSTRING: /data/offen.db
OFFEN_SERVER_PORT: 8080
OFFEN_SERVER_REVERSEPROXY: '1'
OFFEN_SECRETS_COOKIEEXCHANGE: 8jeKYbbnywoYIZznu4HffQ==
OFFEN_SECRETS_EMAILSALT: eypctS7SVKM1Ureb61db5Q==
depends_on:

View File

@ -25,18 +25,12 @@ http {
server {
listen 80;
expires $expires;
proxy_hide_header Content-Security-Policy;
add_header Content-Security-Policy $csp;
proxy_hide_header Strict-Transport-Security;
add_header Strict-Transport-Security 'max-age=604800; includeSubDomains';
proxy_hide_header Referrer-Policy;
add_header Referrer-Policy 'origin-when-cross-origin';
proxy_hide_header X-Content-Type-Options;
add_header X-Content-Type-Options 'nosniff';
proxy_hide_header X-XSS-Protection;
add_header X-XSS-Protection '1; mode=block';
location /api/ {
proxy_pass http://server;
proxy_redirect off;