mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 09:13:08 +00:00
fix: add localhost to CORS_ORIGIN for web mode development
The web mode launcher was setting CORS_ORIGIN to only include the system hostname and 127.0.0.1, but users access via http://localhost:3007 which wasn't in the allowed list. Now includes: - http://localhost:3007 (primary dev URL) - http://$HOSTNAME:3007 (system hostname if needed) - http://127.0.0.1:3007 (loopback IP) Also cleaned up debug logging from CORS check since root cause is now clear. Fixes: Persistent "Not allowed by CORS" errors in web mode Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1075,7 +1075,7 @@ case $MODE in
|
||||
export TEST_PORT="$WEB_PORT"
|
||||
export VITE_SERVER_URL="http://$HOSTNAME:$SERVER_PORT"
|
||||
export PORT="$SERVER_PORT"
|
||||
export CORS_ORIGIN="http://$HOSTNAME:$WEB_PORT,http://127.0.0.1:$WEB_PORT"
|
||||
export CORS_ORIGIN="http://localhost:$WEB_PORT,http://$HOSTNAME:$WEB_PORT,http://127.0.0.1:$WEB_PORT"
|
||||
export VITE_APP_MODE="1"
|
||||
|
||||
if [ "$PRODUCTION_MODE" = true ]; then
|
||||
|
||||
Reference in New Issue
Block a user