Skip to content

Add content-type Header to served files#1182

Merged
morucci merged 1 commit intochange-metrics:masterfrom
GoLinks:content-type
Feb 22, 2026
Merged

Add content-type Header to served files#1182
morucci merged 1 commit intochange-metrics:masterfrom
GoLinks:content-type

Conversation

@seantomburke
Copy link
Contributor

@seantomburke seantomburke commented Feb 19, 2026

Content-type Missing

Currently when I serve the application through Tailscale Serve the content type for all files get defaulted to text/plain since 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.

Served Locally Tailscale Serve
Screenshot 2026-02-18 at 12 18 00 PM Screenshot 2026-02-18 at 12 17 41 PM

This pull request ensures that the content-type is always served for all files types in the project:

Tailscale Serve after fix
Screenshot 2026-02-19 at 11 32 10 AM
Screenshot 2026-02-18 at 11 10 40 AM

Working Dashboard:

Screenshot 2026-02-19 at 11 32 24 AM

@TristanCacqueray
Copy link
Contributor

Thanks, looks good to me!

@seantomburke seantomburke force-pushed the content-type branch 2 times, most recently from e324a55 to 0894682 Compare February 21, 2026 01:56
@seantomburke seantomburke marked this pull request as draft February 21, 2026 02:17
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.
@seantomburke seantomburke marked this pull request as ready for review February 21, 2026 02:46
@seantomburke
Copy link
Contributor Author

@TristanCacqueray I had a formatting issue, but should be resolved now. Need approval for the github actions to run again

@morucci morucci merged commit ae8ea82 into change-metrics:master Feb 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants