Feat: Add sune.chat to allowed origins

This commit is contained in:
2025-09-27 18:05:09 -07:00
parent 18bc080137
commit 568632f7f0

View File

@@ -26,7 +26,7 @@ export default {
if (method === 'OPTIONS') return new Response(null, { status: 204, headers: CORS_HEADERS });
if ((h => h !== 'sune.planetrenox.com' && !h.endsWith('.github.io'))(new URL(req.headers.get('Origin') || 'null').hostname)) return withCORS(new Response('Forbidden', { status: 403 }));
if ((h => h !== 'sune.planetrenox.com' && h !== 'sune.chat' && !h.endsWith('.github.io'))(new URL(req.headers.get('Origin') || 'null').hostname)) return withCORS(new Response('Forbidden', { status: 403 }));
if (url.pathname === '/ws') {
const isGet = method === 'GET';