Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
25c9fb6a
Unverified
Commit
25c9fb6a
authored
May 21, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
May 21, 2024
Browse files
Merge pull request #2474 from baptistecs/patch-1
Fix .js mimetype on Windows 11
parents
f753db60
ecb656af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
backend/main.py
backend/main.py
+2
-0
No files found.
backend/main.py
View file @
25c9fb6a
...
...
@@ -8,6 +8,7 @@ import sys
import
logging
import
aiohttp
import
requests
import
mimetypes
from
fastapi
import
FastAPI
,
Request
,
Depends
,
status
from
fastapi.staticfiles
import
StaticFiles
...
...
@@ -408,6 +409,7 @@ app.mount("/static", StaticFiles(directory=STATIC_DIR), name="static")
app
.
mount
(
"/cache"
,
StaticFiles
(
directory
=
CACHE_DIR
),
name
=
"cache"
)
if
os
.
path
.
exists
(
FRONTEND_BUILD_DIR
):
mimetypes
.
add_type
(
'text/javascript'
,
'.js'
)
app
.
mount
(
"/"
,
SPAStaticFiles
(
directory
=
FRONTEND_BUILD_DIR
,
html
=
True
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment