docker-synapse.minervajuppiter.net

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 2549879f722fd902c245d03bb04ef9d2ffd2e0c8
parent ea75b13ae0ccd28094abbaf11c237803abeca8a3
Author: Minerva_juppiter <94231606+minerva-jupiter@users.noreply.github.com>
Date:   Mon,  9 Feb 2026 18:52:20 +0900

Update nginx.conf
Diffstat:
Mnginx.conf | 26+++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/nginx.conf b/nginx.conf @@ -4,8 +4,32 @@ http { listen 80; server_name docker-synapse.minervajuppiter.net; - # Matrixクライアント(Element等)からの通信をTuwunelに投げる + # .well-known の設定 (Discovery 用) + location /.well-known/matrix/client { + return 200 '{"m.homeserver": {"base_url": "https://docker-synapse.minervajuppiter.net"}}'; + add_header Content-Type application/json; + add_header Access-Control-Allow-Origin *; + } + + location /.well-known/matrix/server { + return 200 '{"m.server": "docker-synapse.minervajuppiter.net:443"}'; + add_header Content-Type application/json; + add_header Access-Control-Allow-Origin *; + } + + # メインの転送設定 location / { + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'X-Requested-With,Content-Type,Authorization' always; + + if ($request_method = 'OPTIONS') { + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'X-Requested-With,Content-Type,Authorization'; + return 204; + } + proxy_pass http://tuwunel:6167; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;