Set correct Content-Type header for JavaScript files
• Fix missing Content-Type header for .js files • Ensure proper MIME type handling • Improve browser compatibility
This commit is contained in:
@@ -488,6 +488,8 @@ def create_app(args):
|
|||||||
)
|
)
|
||||||
response.headers["Pragma"] = "no-cache"
|
response.headers["Pragma"] = "no-cache"
|
||||||
response.headers["Expires"] = "0"
|
response.headers["Expires"] = "0"
|
||||||
|
elif path.endswith(".js"):
|
||||||
|
response.headers["Content-Type"] = "application/javascript"
|
||||||
return response
|
return response
|
||||||
|
|
||||||
# Webui mount webui/index.html
|
# Webui mount webui/index.html
|
||||||
|
Reference in New Issue
Block a user