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:
commit
7b81ab9865
@ -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",
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -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/ {
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user