fix proxy origin header and cors allowed origins config
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user