mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
refactor: Caddy for s3 CORS issue
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
@@ -62,7 +62,7 @@
|
|||||||
header @storage_preflight {
|
header @storage_preflight {
|
||||||
Access-Control-Allow-Origin "{http.request.header.Origin}"
|
Access-Control-Allow-Origin "{http.request.header.Origin}"
|
||||||
Access-Control-Allow-Methods "GET, HEAD, PUT, POST, DELETE, OPTIONS"
|
Access-Control-Allow-Methods "GET, HEAD, PUT, POST, DELETE, OPTIONS"
|
||||||
Access-Control-Allow-Headers "*"
|
Access-Control-Allow-Headers "{http.request.header.Access-Control-Request-Headers}"
|
||||||
Access-Control-Max-Age "86400"
|
Access-Control-Max-Age "86400"
|
||||||
}
|
}
|
||||||
respond @storage_preflight 204
|
respond @storage_preflight 204
|
||||||
@@ -74,5 +74,9 @@
|
|||||||
|
|
||||||
reverse_proxy localhost:3900 {
|
reverse_proxy localhost:3900 {
|
||||||
header_up X-Real-IP {http.request.header.X-Real-IP}
|
header_up X-Real-IP {http.request.header.X-Real-IP}
|
||||||
|
header_down -Access-Control-Allow-Origin
|
||||||
|
header_down -Access-Control-Allow-Methods
|
||||||
|
header_down -Access-Control-Allow-Headers
|
||||||
|
header_down -Access-Control-Expose-Headers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user