Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enables CORS using FastAPI middleware #26

Merged
merged 3 commits into from
Sep 16, 2023
Merged

feat: Enables CORS using FastAPI middleware #26

merged 3 commits into from
Sep 16, 2023

Conversation

frgfm
Copy link
Member

@frgfm frgfm commented May 1, 2023

This PR solves CORS errors when a frontend tries to interact with the API.

cf. https://fastapi.tiangolo.com/tutorial/cors/

@frgfm frgfm added topic: documentation Improvements or additions to documentation type: enhancement New feature or request topic: docker topic: security labels May 1, 2023
@frgfm frgfm added this to the 0.2.0 milestone May 1, 2023
@frgfm frgfm requested review from Nastaliss and a team May 1, 2023 11:27
@frgfm frgfm self-assigned this May 1, 2023
@codecov
Copy link

codecov bot commented May 1, 2023

Codecov Report

Merging #26 (e8ae07d) into main (b23f665) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
+ Coverage   87.40%   87.47%   +0.06%     
==========================================
  Files          24       24              
  Lines         540      543       +3     
==========================================
+ Hits          472      475       +3     
  Misses         68       68              
Flag Coverage Δ
unittests 87.47% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/app/config.py 93.93% <100.00%> (+0.18%) ⬆️
src/app/main.py 73.33% <100.00%> (+1.24%) ⬆️

@frgfm
Copy link
Member Author

frgfm commented Jun 14, 2023

/quack review

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR 🙏

Nothing to report from Quack 🥳

@frgfm frgfm merged commit fc8cd57 into main Sep 16, 2023
@frgfm frgfm deleted the cors branch September 16, 2023 16:38
Nastaliss pushed a commit that referenced this pull request Jul 1, 2024
* feat: Adds CORS middleware

* chore: Updates docker

* docs: Updates README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: docker topic: documentation Improvements or additions to documentation type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants