Update nginx.conf
Browse files- nginx.conf +3 -32
nginx.conf
CHANGED
|
@@ -27,11 +27,9 @@ http {
|
|
| 27 |
proxy_pass http://127.0.0.1:8000/;
|
| 28 |
proxy_http_version 1.1;
|
| 29 |
|
| 30 |
-
# WebSocket and Connection Upgrades
|
| 31 |
proxy_set_header Upgrade $http_upgrade;
|
| 32 |
proxy_set_header Connection $connection_upgrade;
|
| 33 |
|
| 34 |
-
# Hugging Face Security & SSL Proxy Passthrough Headers
|
| 35 |
proxy_set_header Host $host;
|
| 36 |
proxy_set_header X-Real-IP $remote_addr;
|
| 37 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
@@ -39,36 +37,9 @@ http {
|
|
| 39 |
proxy_set_header X-Forwarded-Host $host;
|
| 40 |
proxy_set_header X-Forwarded-Port 443;
|
| 41 |
|
| 42 |
-
# Inject
|
| 43 |
-
|
| 44 |
-
<
|
| 45 |
-
<div style="background:rgba(25,25,35,0.5); backdrop-filter:blur(20px) saturate(160%%); -webkit-backdrop-filter:blur(20px) saturate(160%%); border:1px solid rgba(255,255,255,0.08); padding:8px 12px; border-radius:20px; display:flex; align-items:center; gap:12px; box-shadow:0 10px 30px rgba(0,0,0,0.5);">
|
| 46 |
-
<div class="dock-btn" onclick="window.location.href=window.location.origin" style="width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center; cursor:pointer; background:rgba(59,130,246,0.2); border:1px solid rgba(59,130,246,0.4); transition:transform 0.2s;">
|
| 47 |
-
<svg style="width:22px; height:22px;" viewBox="0 0 24 24" fill="none" stroke="#3b82f6" stroke-width="2"><path d="M16.5 2L22 7.5V16.5L16.5 22L11 16.5L2 21V3L11 7.5L16.5 2Z"/></svg>
|
| 48 |
-
</div>
|
| 49 |
-
<div class="dock-btn" onclick="window.location.href=window.location.origin+\"?payload=[[\\\"openTerminal\\\",true]]\"" style="width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center; cursor:pointer; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.05); transition:transform 0.2s;">
|
| 50 |
-
<svg style="width:22px; height:22px;" viewBox="0 0 24 24" fill="none" stroke="#f59e0b" stroke-width="2"><path d="M4 17l6-6-6-6M12 19h8"/></svg>
|
| 51 |
-
</div>
|
| 52 |
-
<div class="dock-btn" onclick="document.getElementById(\"preview-window\").style.display=\"flex\"" style="width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center; cursor:pointer; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.05); transition:transform 0.2s;">
|
| 53 |
-
<svg style="width:22px; height:22px;" viewBox="0 0 24 24" fill="none" stroke="#10b981" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10zM2 12h20"/></svg>
|
| 54 |
-
</div>
|
| 55 |
-
</div>
|
| 56 |
-
</div>
|
| 57 |
-
<div id="preview-window" style="position:fixed; top:0; left:0; width:100vw; height:100vh; background:#1e1e24; z-index:999998; display:none; flex-direction:column;">
|
| 58 |
-
<div style="background:#1e1e24; padding:8px 16px; display:flex; align-items:center; gap:12px; border-bottom:1px solid #2d2d34;">
|
| 59 |
-
<div style="display:flex; gap:6px;"><div style="width:12px; height:12px; border-radius:50%%; background:#ff5f56; cursor:pointer;" onclick="document.getElementById(\"preview-window\").style.display=\"none\""></div><div style="width:12px; height:12px; border-radius:50%%; background:#ffbd2e;"></div><div style="width:12px; height:12px; border-radius:50%%; background:#27c93f;"></div></div>
|
| 60 |
-
<div style="display:flex; flex-grow:1; background:#121214; border-radius:6px; padding:6px 12px; align-items:center; border:1px solid #3a3a42;">
|
| 61 |
-
<span style="color:#666; font-size:13px; margin-right:4px;">localhost:</span>
|
| 62 |
-
<input type="number" id="target-port" value="3000" style="background:transparent; border:none; color:#e3e3e6; width:100%%; font-size:13px; outline:none;">
|
| 63 |
-
</div>
|
| 64 |
-
<button onclick="document.getElementById(\"preview-frame\").src=window.location.origin+\"/proxy/\"+document.getElementById(\"target-port\").value+\"/\"" style="background:#3b82f6; color:white; border:none; padding:6px 14px; border-radius:5px; cursor:pointer; font-size:13px; font-weight:500;">Connect</button>
|
| 65 |
-
</div>
|
| 66 |
-
<iframe id="preview-frame" style="flex-grow:1; border:none; background:#fff;"></iframe>
|
| 67 |
-
</div>
|
| 68 |
-
<style>
|
| 69 |
-
.dock-btn:hover { transform: scale(1.18) translateY(-4px) !important; background: rgba(255,255,255,0.15) !important; }
|
| 70 |
-
</style>
|
| 71 |
-
</body>';
|
| 72 |
sub_filter_once on;
|
| 73 |
}
|
| 74 |
|
|
|
|
| 27 |
proxy_pass http://127.0.0.1:8000/;
|
| 28 |
proxy_http_version 1.1;
|
| 29 |
|
|
|
|
| 30 |
proxy_set_header Upgrade $http_upgrade;
|
| 31 |
proxy_set_header Connection $connection_upgrade;
|
| 32 |
|
|
|
|
| 33 |
proxy_set_header Host $host;
|
| 34 |
proxy_set_header X-Real-IP $remote_addr;
|
| 35 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
| 37 |
proxy_set_header X-Forwarded-Host $host;
|
| 38 |
proxy_set_header X-Forwarded-Port 443;
|
| 39 |
|
| 40 |
+
# Inject layout reliably via Server Side Includes block
|
| 41 |
+
ssi on;
|
| 42 |
+
sub_filter '</body>' '</body>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
sub_filter_once on;
|
| 44 |
}
|
| 45 |
|