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
ComfyUI
Commits
b9308407
"...csrc/git@developer.sourcefind.cn:zhaoyu6/sglang.git" did not exist on "c08a717c7728358530c7bd50547db80ec8ac87a1"
Commit
b9308407
authored
Jan 24, 2023
by
comfyanonymous
Browse files
Make webui return correct mimetypes for css and js files.
parent
463d0d08
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
main.py
main.py
+6
-1
No files found.
main.py
View file @
b9308407
...
...
@@ -294,6 +294,11 @@ class PromptServer(BaseHTTPRequestHandler):
out
[
x
]
=
info
self
.
wfile
.
write
(
json
.
dumps
(
out
).
encode
(
'utf-8'
))
elif
self
.
path
[
1
:]
in
os
.
listdir
(
self
.
server
.
server_dir
):
if
self
.
path
[
1
:].
endswith
(
'.css'
):
self
.
_set_headers
(
ct
=
'text/css'
)
elif
self
.
path
[
1
:].
endswith
(
'.js'
):
self
.
_set_headers
(
ct
=
'text/javascript'
)
else
:
self
.
_set_headers
()
with
open
(
os
.
path
.
join
(
self
.
server
.
server_dir
,
self
.
path
[
1
:]),
"rb"
)
as
f
:
self
.
wfile
.
write
(
f
.
read
())
...
...
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