zhlajiex commited on
Commit
df4dfac
·
1 Parent(s): e2efce1

Another One

Browse files
backend/public/auth.html CHANGED
@@ -87,9 +87,7 @@
87
  };
88
 
89
  // Smart Uplink Detection
90
- const API_BASE = (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1")
91
- ? "http://localhost:3000"
92
- : "https://codex-shxo.onrender.com";
93
 
94
  form.onsubmit = async (e) => {
95
  e.preventDefault();
 
87
  };
88
 
89
  // Smart Uplink Detection
90
+ const API_BASE = window.location.origin;
 
 
91
 
92
  form.onsubmit = async (e) => {
93
  e.preventDefault();
backend/public/broadcast.html CHANGED
@@ -67,7 +67,7 @@
67
  </div>
68
 
69
  <script>
70
- const API_BASE = window.location.hostname === "localhost" ? "http://localhost:3000" : "https://codex-shxo.onrender.com";
71
 
72
  function checkAuth() {
73
  const pass = document.getElementById('admin-pass').value;
 
67
  </div>
68
 
69
  <script>
70
+ const API_BASE = window.location.origin;
71
 
72
  function checkAuth() {
73
  const pass = document.getElementById('admin-pass').value;
backend/public/chat.html CHANGED
@@ -204,9 +204,7 @@
204
  </div>
205
 
206
  <script>
207
- const token = localStorage.getItem('token');
208
- if (!token) window.location.href = '/auth';
209
- const API_BASE = (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") ? "http://localhost:3000" : "https://codex-shxo.onrender.com";
210
  let currentSessionId = null, selectedFile = null, isProcessing = false;
211
  const chatWindow = document.getElementById('chat-window'), input = document.getElementById('user-input');
212
 
 
204
  </div>
205
 
206
  <script>
207
+ const API_BASE = window.location.origin;
 
 
208
  let currentSessionId = null, selectedFile = null, isProcessing = false;
209
  const chatWindow = document.getElementById('chat-window'), input = document.getElementById('user-input');
210
 
backend/public/sentinel.html CHANGED
@@ -57,9 +57,7 @@
57
  </div>
58
 
59
  <script>
60
- const terminal = document.getElementById('terminal');
61
- const input = document.getElementById('cmd-input');
62
- const API_BASE = window.location.hostname === "localhost" ? "http://localhost:3000" : "https://codex-shxo.onrender.com";
63
  let knownLogs = new Set();
64
 
65
  async function sendCommand() {
 
57
  </div>
58
 
59
  <script>
60
+ const API_BASE = window.location.origin;
 
 
61
  let knownLogs = new Set();
62
 
63
  async function sendCommand() {
backend/server.js CHANGED
@@ -65,6 +65,7 @@ app.use(cors({
65
  origin: function (origin, callback) {
66
  const allowed = [
67
  "zhlajiex-codeai.hf.space",
 
68
  "https://codex-shxo.onrender.com",
69
  "https://codex.js.org",
70
  "https://codex.qzz.io",
 
65
  origin: function (origin, callback) {
66
  const allowed = [
67
  "zhlajiex-codeai.hf.space",
68
+ "https://zhlajiex-codeai.hf.space",
69
  "https://codex-shxo.onrender.com",
70
  "https://codex.js.org",
71
  "https://codex.qzz.io",