🐛 Fix websocket gateway, finally

This commit is contained in:
2025-09-22 01:33:30 +08:00
parent d5a5721402
commit 5b31357fe9
5 changed files with 35 additions and 30 deletions

22
Caddyfile Normal file
View File

@@ -0,0 +1,22 @@
:5002 {
@cors_preflight method OPTIONS
header {
Access-Control-Allow-Origin "{header.origin}"
Vary Origin
Access-Control-Expose-Headers "*"
+Access-Control-Allow-Headers "*"
+Access-Control-Allow-Headers "Authorization,Content-Type,Accept,User-Agent"
Access-Control-Allow-Credentials "true"
}
handle @cors_preflight {
header {
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE"
Access-Control-Max-Age "3600"
}
respond "" 204
}
reverse_proxy host.docker.internal:5001
}