KnightHacks / hackathon-2021-backend

The backend api for Knight Hacks.
https://api.knighthacks.org/apidocs/
MIT License
3 stars 3 forks source link

Resolve CORS localhost issues #61

Closed rob-3 closed 3 years ago

rob-3 commented 3 years ago

I added some CORS headers that I believe will get requests from localhost to work, which will make testing the frontend easier.

Checklist:

github-actions[bot] commented 3 years ago

File Coverage
All files 73% :x:
src/__init__.py 94% :white_check_mark:
src/api/__init__.py 85% :white_check_mark:
src/api/auth.py 43% :x:
src/api/club_events.py 66% :x:
src/api/email_verification.py 35% :x:
src/api/hackers.py 56% :x:
src/common/decorators.py 87% :white_check_mark:
src/common/init_defaults.py 56% :x:
src/common/json.py 77% :white_check_mark:
src/common/jwt.py 73% :x:
src/common/mail.py 52% :x:
src/models/hacker.py 94% :white_check_mark:
src/models/sponsor.py 64% :x:
src/models/user.py 88% :white_check_mark:
src/tasks/__init__.py 78% :white_check_mark:
src/tasks/clubevent_tasks.py 19% :x:
src/tasks/mail_tasks.py 45% :x:

Minimum allowed coverage is 75%

Generated by :monkey: cobertura-action against 7a731036c74416a6168667f3fd08d1ea841c8060

TorrentofShame commented 3 years ago

The current CORS policy of the backend does not restrict what origin to accept request from.

As such, any issue with CORS must be resolved on the frontend.