-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from ComfyWorkflows/proxy_helpers
Adding PROXY_MODE to support running the Launcher behind a proxy w/ only a single port exposed.
- Loading branch information
Showing
16 changed files
with
359 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
worker_processes auto; | ||
pid /run/nginx.pid; | ||
include /etc/nginx/modules-enabled/*.conf; | ||
|
||
events { | ||
worker_connections 768; | ||
} | ||
|
||
http { | ||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 65; | ||
types_hash_max_size 2048; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; | ||
|
||
gzip on; | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
# include /etc/nginx/sites-enabled/*; | ||
|
||
# # Default server configuration | ||
server { | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
|
||
location / { | ||
proxy_pass http://127.0.0.1:4000; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
location ~ ^/comfy/(\d+)/ { | ||
rewrite ^/comfy/(\d+)(/.*)?$ $2 break; | ||
proxy_pass http://127.0.0.1:$1; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
|
||
# WebSocket support | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,29 @@ | |
<head> | ||
<title>ComfyUI Launcher</title> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap" rel="stylesheet"> | ||
<style type="text/css"> | ||
.inter-400 { | ||
font-family: "Inter", sans-serif; | ||
font-optical-sizing: auto; | ||
font-weight: 400; | ||
font-style: normal; | ||
font-variation-settings: | ||
"slnt" 0; | ||
} | ||
</style> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap" rel="stylesheet"> | ||
<style type="text/css"> | ||
.inter-400 { | ||
font-family: "Inter", sans-serif; | ||
font-optical-sizing: auto; | ||
font-weight: 400; | ||
font-style: normal; | ||
font-variation-settings: "slnt" 0; | ||
} | ||
</style> | ||
<script type="text/javascript"> | ||
document.addEventListener("DOMContentLoaded", function() { | ||
// Get the current URL's pathname | ||
var currentPath = window.location.pathname; | ||
// Ensure it ends with a "/" | ||
if (!currentPath.endsWith('/')) { | ||
currentPath += '/'; | ||
} | ||
// Set the iframe src to currentPath + "comfyui_interface" | ||
document.getElementById('comfyui-iframe').src = currentPath + "comfyui_interface"; | ||
}); | ||
</script> | ||
</head> | ||
|
||
<body style="margin: 0px; padding: 0px; height: 100%; width: 100%; display: flex; flex-direction: column;"> | ||
|
@@ -24,7 +35,7 @@ | |
<div class="inter-400" style="margin-left: 10px;">ComfyUI Launcher</div> | ||
</div> | ||
|
||
<iframe src="/comfyui_interface" style="width: 100%; height: 100%; border: none;"></iframe> | ||
<iframe id="comfyui-iframe" style="width: 100%; height: 100%; border: none;"></iframe> | ||
</body> | ||
|
||
</html> |
64 changes: 32 additions & 32 deletions
64
web/dist/assets/index-BJzLC9xk.js → web/dist/assets/index-iDLtCcjR.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.