Conversation
When using the hosted app (app.openarchflow.cloud), browsers enforce CORS policy and cannot directly access localhost:4566 without proper headers. MiniStack doesn't provide global CORS configuration, so this change adds: - docker/ministack-cors-proxy/: nginx-based reverse proxy that adds Access-Control-Allow-Origin and handles OPTIONS preflight requests - docker-compose.ministack.yml: starts MiniStack + proxy sidecar on port 4567 - Updated README.md with clear guidance on when to use the proxy and why - Updated MiniStackConfigDialog hint for users hitting CORS errors - Updated CHANGELOG documentation to reflect actual CORS behavior The proxy streams large payloads (S3 uploads, Lambda .zip files) without buffering and preserves Host headers for SigV4 signature verification. Backward compatible: local OpenArchFlow deployments continue to use localhost:4566 directly; hosted app users can opt into the proxy. Fixes browser CORS errors when accessing localhost MiniStack from https://app.openarchflow.cloud
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes browser CORS errors when accessing localhost:4566 from the hosted app (app.openarchflow.cloud). When a user connects the OpenArchFlow frontend to MiniStack running on their local machine, the browser enforces CORS policy and blocks direct access to
http://localhost:4566without proper response headers.MiniStack doesn't provide global CORS configuration, so this change adds:
docker/ministack-cors-proxy/) that addsAccess-Control-Allow-Originand handles OPTIONS preflight requests required by AWS SigV4 signaturesdocker-compose.ministack.yml) to start MiniStack + proxy sidecar on port 4567Technical Details
The proxy:
Hostheaders for AWS SigV4 signature verificationAccess-Control-Request-Headersinstead of hard-coding header allowlistsministackservice nameTest Plan
Breaking Changes
None. This is fully backward compatible:
localhost:4566directlyDEFAULT_MINISTACK_CONFIG.endpointremainshttp://localhost:4566(no silent changes to saved configs)