fix proxy origin header and cors allowed origins config

This commit is contained in:
2026-04-15 07:37:43 -06:00
parent 5c85c43d5e
commit bbda43e4a0
2 changed files with 2 additions and 0 deletions

View File

@@ -53,6 +53,7 @@ app:
upload: upload:
base-dir: ${UPLOAD_BASE_DIR:uploads} base-dir: ${UPLOAD_BASE_DIR:uploads}
frontend-url: ${FRONTEND_URL:http://localhost:3000} frontend-url: ${FRONTEND_URL:http://localhost:3000}
allowed-origins: ${ALLOWED_ORIGINS:http://localhost:3000,http://localhost:3001,http://127.0.0.1:3000}
azure: azure:
storage: storage:

View File

@@ -7,6 +7,7 @@ async function proxy(request, { params }) {
const headers = new Headers(request.headers) const headers = new Headers(request.headers)
headers.delete('host') headers.delete('host')
headers.delete('origin')
const init = { method: request.method, headers } const init = { method: request.method, headers }
if (!['GET', 'HEAD'].includes(request.method)) { if (!['GET', 'HEAD'].includes(request.method)) {