support local debugging behind nginx w/o certs/ssl

This commit is contained in:
Collin M. Barrett 2019-06-23 20:38:33 -05:00
parent 02c69ce43c
commit 2ce51f634b
3 changed files with 36 additions and 1 deletions

View file

@ -1,6 +1,12 @@
version: "3.7"
services:
nginx:
ports:
- "80:80"
volumes:
- ./ops/nginx/conf.d.dev:/etc/nginx/conf.d:ro
api:
build:
target: build

View file

@ -0,0 +1,29 @@
# https://github.com/collinbarrett/FilterLists
server {
listen 80 default_server;
include svr-includes/*;
location ^~ /api {
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://api:80;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
proxy_pass http://web:80;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

View file

@ -34,7 +34,7 @@ server {
# Redirect http to https
server {
listen 80;
listen 80 default_server;
server_name filterlists.com;
return 301 https://filterlists.com$request_uri;