Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions caddy/Caddyfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
header {
Access-Control-Allow-Origin "http://localhost:5173" # allows the Vue app (running on localhost:5173) to make requests.
Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" # Specifies which methods are allowed.
Access-Control-Allow-Headers "X-API-Key, X-API-Username, X-API-Signature, Content-Type, User-Agent" # allows the custom headers needed by the API.
Access-Control-Allow-Headers "X-API-Key, X-API-Username, X-API-Signature, Content-Type, User-Agent, If-None-Match" # allows the custom headers needed by the API.
Access-Control-Expose-Headers "ETag"
}

# This handles the browser's "preflight" OPTIONS request.
Expand All @@ -29,7 +30,7 @@
# Reflect the Origin back so it's always allowed
header Access-Control-Allow-Origin "{http.request.header.Origin}"
header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
header Access-Control-Allow-Headers "X-API-Key, X-API-Username, X-API-Signature, Content-Type, User-Agent"
header Access-Control-Allow-Headers "X-API-Key, X-API-Username, X-API-Signature, Content-Type, User-Agent, If-None-Match"
header Access-Control-Max-Age "86400"
respond 204
}
Expand Down
5 changes: 3 additions & 2 deletions caddy/Caddyfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ oullin.io {
header {
Access-Control-Allow-Origin "https://oullin.io"
Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
Access-Control-Allow-Headers "X-API-Key, X-API-Username, X-API-Signature, Content-Type, User-Agent"
Access-Control-Allow-Headers "X-API-Key, X-API-Username, X-API-Signature, Content-Type, User-Agent, If-None-Match"
Access-Control-Expose-Headers "ETag"
}

@preflight {
Expand All @@ -46,7 +47,7 @@ oullin.io {
# Reflect the Origin back so it's always allowed
header Access-Control-Allow-Origin "{http.request.header.Origin}"
header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
header Access-Control-Allow-Headers "X-API-Key, X-API-Username, X-API-Signature, Content-Type, User-Agent"
header Access-Control-Allow-Headers "X-API-Key, X-API-Username, X-API-Signature, Content-Type, User-Agent, If-None-Match"
header Access-Control-Max-Age "86400"
respond 204
}
Expand Down
Loading