Skip to content

fix: set CORS to wildcard for public API access#63

Merged
Sagargupta16 merged 1 commit intomainfrom
feature/frontend-enhancement
Mar 14, 2026
Merged

fix: set CORS to wildcard for public API access#63
Sagargupta16 merged 1 commit intomainfrom
feature/frontend-enhancement

Conversation

@Sagargupta16
Copy link
Copy Markdown
Owner

@Sagargupta16 Sagargupta16 commented Mar 14, 2026

Summary

  • Set CORS allow_origins to ["*"] so any frontend domain can access the API (fixes 404/CORS errors from sagargupta.online -> ledger-sync.onrender.com)
  • Set allow_credentials=False (required by CORS spec when using wildcard origin -- auth still works via Authorization bearer header)
  • Allow all methods and headers (["*"])

Test plan

  • Verify https://sagargupta.online can upload files to https://ledger-sync.onrender.com/api/upload without CORS errors
  • Verify API calls from any origin return proper Access-Control-Allow-Origin: * header
  • Verify JWT auth still works via Authorization header

@sonarqubecloud
Copy link
Copy Markdown

@Sagargupta16 Sagargupta16 merged commit c0c30ae into main Mar 14, 2026
4 checks passed
@Sagargupta16 Sagargupta16 deleted the feature/frontend-enhancement branch March 14, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant