Merged Caddy into docker-compose and added edge CORS handling
This commit is contained in:
1 parent
e83bb522a4
commit
36530eb2c5
2 files changed
+44
-10
No files matched your search
@@ -0,0 +1,20 @@
|
||||
ai-gateway.ldex.dev {
|
||||
# 1. Force CORS headers for every request
|
||||
header {
|
||||
Access-Control-Allow-Origin *
|
||||
Access-Control-Allow-Methods "GET, POST, OPTIONS"
|
||||
Access-Control-Allow-Headers "*"
|
||||
Access-Control-Expose-Headers "*"
|
||||
}
|
||||
|
||||
# 2. Immediately handle OPTIONS requests (the preflight)
|
||||
@options {
|
||||
method OPTIONS
|
||||
}
|
||||
handle @options {
|
||||
respond "" 204
|
||||
}
|
||||
|
||||
# 3. Proxy everything else to the app
|
||||
reverse_proxy ai-gateway:8000
|
||||
}
|
||||
Reference in new issue
Block a user