chore: caddy: enable logging of static file requests (#36500)

## Description
- Enable logs of static file requests in caddy.
- Skip logging for CSS and JS source map files. These files are
inconsequential for page rendering and therefore not worth tracking, as
they only pollute the log files.

Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11016033178>
> Commit: 97cfe307355f159a9cb80295fb566c406ffc056a
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11016033178&attempt=3"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Wed, 25 Sep 2024 05:08:51 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced logging configurations to improve performance by skipping
logs for health check requests and JavaScript map files.

- **Bug Fixes**
- Adjusted existing logging behavior for file handling to ensure more
accurate log processing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Diljit 2024-09-25 11:01:18 +05:30 committed by GitHub
parent 199638229b
commit 4743e96846
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,8 +72,16 @@ parts.push(`
log {
output stdout
}
# skip logs for health check
skip_log /api/v1/health
# skip logs for sourcemap files
@source-map-files {
path_regexp ^.*\.(js|css)\.map$
}
skip_log @source-map-files
# The internal request ID header should never be accepted from an incoming request.
request_header -X-Appsmith-Request-Id
@ -110,7 +118,6 @@ parts.push(`
@file file
handle @file {
import file_server
skip_log
}
handle /static/* {