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:
parent
d97da6068a
commit
0961a21722
1 changed files with 2 additions and 0 deletions
|
|
@ -488,6 +488,8 @@ def create_app(args):
|
|||
)
|
||||
response.headers["Pragma"] = "no-cache"
|
||||
response.headers["Expires"] = "0"
|
||||
elif path.endswith(".js"):
|
||||
response.headers["Content-Type"] = "application/javascript"
|
||||
return response
|
||||
|
||||
# Webui mount webui/index.html
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue