[PR #264] [MERGED] Add MIME type to served files #1000

Closed
opened 2026-03-15 21:46:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynqmon/pull/264
Author: @ArneZsng
Created: 8/23/2022
Status: Merged
Merged: 12/18/2022
Merged by: @hibiken

Base: masterHead: master


📝 Commits (2)

📊 Changes

1 file changed (+8 additions, -0 deletions)

View changed files

📝 static.go (+8 -0)

📄 Description

Currently, all JS files are served as "content-type: text/plain; charset=utf-8" which is a problem if MIME sniffing is disabled for the domain that Asynqmon is hosted on.

This PR sets the Content-Type header manually for files ending in .js and tries to detect the MIME type for other files.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hibiken/asynqmon/pull/264 **Author:** [@ArneZsng](https://github.com/ArneZsng) **Created:** 8/23/2022 **Status:** ✅ Merged **Merged:** 12/18/2022 **Merged by:** [@hibiken](https://github.com/hibiken) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`dd733fe`](https://github.com/hibiken/asynqmon/commit/dd733fed35dcdfdb0f4283ca71658322cceeb37c) Add MIME type to served files - [`665f340`](https://github.com/hibiken/asynqmon/commit/665f3406a382f771f2d28bef36b5a91c51f32dd8) Update static.go ### 📊 Changes **1 file changed** (+8 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `static.go` (+8 -0) </details> ### 📄 Description Currently, all JS files are served as "content-type: text/plain; charset=utf-8" which is a problem if MIME sniffing is disabled for the domain that Asynqmon is hosted on. This PR sets the Content-Type header manually for files ending in .js and tries to detect the MIME type for other files. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 21:46:42 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynqmon#1000
No description provided.