Add content-type Header to served files#1182
Merged
morucci merged 1 commit intochange-metrics:masterfrom Feb 22, 2026
Merged
Conversation
TristanCacqueray
approved these changes
Feb 20, 2026
Contributor
|
Thanks, looks good to me! |
e324a55 to
0894682
Compare
This update includes the addition of the 'filepath' dependency in the cabal file and implements a function to set the correct Content-Type headers for static files based on their extensions in the Main.hs file.
bee361d to
3738161
Compare
Contributor
Author
|
@TristanCacqueray I had a formatting issue, but should be resolved now. Need approval for the github actions to run again |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Content-type Missing
Currently when I serve the application through Tailscale Serve the content type for all files get defaulted to
text/plainsince they are not present. When I updated tailscale on my server, it broke Monocle not allowing any CSS or Javascript to load since the content-types were not set.This PR adds content types for all the static files being served by Monocle.
This pull request ensures that the content-type is always served for all files types in the project:
Working Dashboard: