Skip to content

Commit c119cde

Browse files
committed
Attempt at #1
1 parent 8333620 commit c119cde

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

.github/workflows/imaging.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
push:
1818
branches:
1919
- main
20+
- issue/**
2021
paths:
2122
- 'docker/**'
2223
- 'etc/**'
@@ -40,7 +41,7 @@ jobs:
4041
password: ${{secrets.DOCKERHUB_TOKEN}}
4142
-
4243
name: 📚 Repository Checkout
43-
uses: actions/checkout@v4
44+
uses: actions/checkout@v6
4445
-
4546
name: 🎰 QEMU Multiple Machine Emulation
4647
uses: docker/setup-qemu-action@v3
@@ -49,7 +50,7 @@ jobs:
4950
uses: docker/setup-buildx-action@v3
5051
-
5152
name: 🧱 Image Construction and Publication
52-
uses: docker/build-push-action@v5
53+
uses: docker/build-push-action@v6
5354
with:
5455
context: .
5556
file: docker/Dockerfile

etc/default.conf.template

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,16 @@ server {
6262
location ${PROXY_PATH} {
6363
proxy_pass ${PROXY_URL};
6464
proxy_redirect ${PROXY_REDIRECT};
65-
proxy_set_header Host $http_host;
66-
proxy_set_header Origin http://$http_host;
65+
proxy_set_header Host $upstream_host;
66+
proxy_set_header X-Forwarded-Host $upstream_host;
67+
proxy_set_header X-Forwarded-Proto $upstream_proto;
68+
proxy_set_header X-Forwarded-Port $upstream_port;
69+
6770
proxy_set_header X-Forwarded-Prefix ${PROXY_PATH};
68-
proxy_set_header X-Forwarded-Port ${PROXY_PORT};
69-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
70-
proxy_set_header X-Forwarded-Proto $scheme;
71+
7172
proxy_set_header X-Real-IP $remote_addr;
73+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
74+
7275
# Disclosure reduction
7376
proxy_hide_header X-Powered-By;
7477
proxy_ssl_verify off;

etc/nginx.conf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,22 @@ http {
5656

5757
access_log /var/log/nginx/access.log main;
5858
include /etc/nginx/conf.d/*.conf;
59+
60+
map $http_x_forwarded_host $upstream_host {
61+
default $http_x_forwarded_host;
62+
"" $http_host;
63+
}
64+
65+
map $http_x_forwarded_proto $upstream_proto {
66+
default $http_x_forwarded_proto;
67+
"" $scheme;
68+
}
69+
70+
map $http_x_forwarded_port $upstream_port {
71+
default $http_x_forwarded_port;
72+
"" $server_port;
73+
}
74+
5975
}
6076

6177
# -*- mode: nginx; tab-width: 4; -*-

0 commit comments

Comments
 (0)