Files
Draupnir/ci-in-a-box/scripts/nginx/nginx.conf
Catalan Lover 1057ec341e CI in a Box (#1175)
* Introduce Ci in a Box

Ci in a box is the next generation Ci project for Draupnir aiming to kill our dependence on mx-tester in the long run as its unmaintained and less powerful than ci-in-a-box

* Update CI-in-a-Box run conditions

If we run docker validation lets just run ci-in-a-box against it at that point.

* Please the prettier

* Fix CI Logic Error

* Return to Ci box specific harness.

The generic one has the wrong addresses that screwed up AS tests.

* Fix REUSE.toml error for ci-in-a-box Postgres setup script
2026-09-09 16:53:56 +00:00

44 lines
1.4 KiB
Nginx Configuration File

# SPDX-FileCopyrightText: 2024 Gnuxie <Gnuxie@protonmail.com>
#
# SPDX-License-Identifier: CC0-1.0
events {
}
http {
resolver 127.0.0.11 ipv6=off valid=5s;
server {
listen 8081;
location ~ ^/_matrix/client/(r0|v3)/rooms/([^/]*)/report/(.*)$ {
mirror /report_mirror;
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,Keep-Alive,X-Requested-With,If-Modified-Since' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
add_header 'Access-Control-Max-Age' 1728000;
set $room_id $2;
set $event_id $3;
set $draupnir_integration_upstream draupnir-integration:8082;
proxy_pass http://$draupnir_integration_upstream/api/1/report/$room_id/$event_id;
}
location / {
proxy_pass http://synapse:8008;
}
location /report_mirror {
internal;
proxy_pass http://synapse:8008$request_uri;
}
location /draupnir_news.json {
root /var/www/test;
default_type application/json;
}
}
}