Fix OpsProof public demo proxy host
Homelab Main / validate (push) Failing after 1m33s Details
Homelab Main / running-update (push) Has been skipped Details
Homelab Main / debian-ops (push) Has been skipped Details

This commit is contained in:
juvenal.diaz 2026-12-04 22:34:44 -06:00
parent eda4231e2d
commit d59e6da7c1
2 changed files with 6 additions and 2 deletions

View File

@ -153,7 +153,7 @@ server {
location = /demo {
proxy_pass http://${opsproof_backend_host}:${opsproof_backend_port};
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Host ${opsproof_backend_host}:${opsproof_backend_port};
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
@ -163,7 +163,7 @@ server {
location ^~ /build/ {
proxy_pass http://${opsproof_backend_host}:${opsproof_backend_port};
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Host ${opsproof_backend_host}:${opsproof_backend_port};
proxy_set_header X-Forwarded-Proto https;
expires 1h;
}

View File

@ -204,6 +204,10 @@ class OpsProofPipelineTests(unittest.TestCase):
self.assertIn("server_name ${opsproof_server_name}", edge)
self.assertIn("location = /demo", edge)
self.assertIn("location ^~ /build/", edge)
self.assertGreaterEqual(
edge.count("proxy_set_header Host ${opsproof_backend_host}:${opsproof_backend_port};"),
2,
)
if __name__ == "__main__":