fix: remove cache control headers for requests handled with an error in Caddy (#36590)

This commit is contained in:
Diljit 2024-10-07 13:59:29 +05:30 committed by GitHub
parent 28e54fe10d
commit 95010fd0f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,13 +74,13 @@ parts.push(`
}
# skip logs for health check
skip_log /api/v1/health
log_skip /api/v1/health
# skip logs for sourcemap files
@source-map-files {
path_regexp ^.*\.(js|css)\.map$
}
skip_log @source-map-files
log_skip @source-map-files
# The internal request ID header should never be accepted from an incoming request.
request_header -X-Appsmith-Request-Id
@ -154,7 +154,12 @@ parts.push(`
handle_errors {
respond "{err.status_code} {err.status_text}" {err.status_code}
header -Server
header {
# Remove the Server header from the response.
-Server
# Remove Cache-Control header from the response.
-Cache-Control
}
}
}