Spaces:
Paused
Paused
Update hf.js
Browse files9 unmodified lines1011121314159 unmodified lineschangeOrigin: true}));const port = process.env.HF_PORT || 7860;app.listen(port, () => {console.log(`HF Proxy server is running at PORT: ${port}`);9 unmodified lines101112131415161718192021222324252627282930313233343536373839409 unmodified lineschangeOrigin: true}));app.get('/', (req, res) => {const htmlContent = `<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>My Static Page</title></head><body><p> Cursor To OpenAI Server </p><p> 聊天来源: 自定义(兼容 OpenAI) </p><p> 自定义端点(基本URL):<div id="endpoint-url"></div></p><p> 自定义API密钥:「抓取的Cursor Cookie,开头为user_」</p><script>const url = new URL(window.location.href);const link = url.protocol + '//' + url.host + '/hf/v1';document.getElementById('endpoint-url').textContent = 'Dynamic URL: ' + link;</script></body></html>`;res.send(htmlContent);});const port = process.env.HF_PORT || 7860;app.listen(port, () => {console.log(`HF Proxy server is running at PORT: ${port}`);
hf.js+25