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

CORS support should be optional #90

Closed
3 tasks
uniqueg opened this issue Feb 16, 2021 · 1 comment · Fixed by #92
Closed
3 tasks

CORS support should be optional #90

uniqueg opened this issue Feb 16, 2021 · 1 comment · Fixed by #92
Assignees
Labels
flag: good 1st issue Good for newcomers priority: medium Medium priority type: feature New feature or request workload: minutes Likely takes minutes to resolve
Milestone

Comments

@uniqueg
Copy link
Member

uniqueg commented Feb 16, 2021

While I don't understand tne implications fully, I think [CORS][] should not be enabled for every microservice and thus should be made optional.

It's rather an easy fix but needs some changes all around (code, docstrings, possibly examples).

In principle, this is what needs to be done, as far as I can tell:

  • A config parameter enable_cors should be added to the SecurityConfig model (set default to True) in foca/models/config.py; update docstring accordingly, including example and, if necessary, dependent examples (search file for any mentions of SecurityConfig)
  • In the main FOCA file (foca/foca.py), the value of the config parameter should be read to decide whether to call enable_cors() in line 49 (i.e., add an if ... around that call and the log message, maybe add another log message to say that CORS is disabled in the else ... block)
  • Check if any documentation needs to be updated
@uniqueg uniqueg added flag: good 1st issue Good for newcomers priority: medium Medium priority type: feature New feature or request workload: minutes Likely takes minutes to resolve labels Feb 16, 2021
@uniqueg uniqueg added this to the v1.0.0 milestone Feb 16, 2021
@vipulchhabra99
Copy link
Contributor

Can you please assign me this issue? @uniqueg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: good 1st issue Good for newcomers priority: medium Medium priority type: feature New feature or request workload: minutes Likely takes minutes to resolve
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants