[C4GT Community]: Replace FromOriginMatchHeader secret to locally set environment variable #57
Labels
bug
Something isn't working
C4GT Coding
C4GT Community
good first issue
Good for newcomers
help wanted
Extra attention is needed
Milestone
Ticket Contents
Description
There is a binder
FromHeader
here:https://github.com/Xcov19/project-healthcare/blob/e8fb0a6a8a6cbcb0f7fd1b8f7429790eadea2930/xcov19/app/settings.py#L48
and here:
https://github.com/Xcov19/project-healthcare/blob/e8fb0a6a8a6cbcb0f7fd1b8f7429790eadea2930/xcov19/app/middleware.py#L20
which are currently hardcoded. It needs to be replaced with a value sourced directly from environment variable. The value can be any sophisticated super secret string one can conjure in the localhost.
The code describes where and why this is used.
Reference: You see this getting used during API calls here: https://project-healthcare.onrender.com/docs
Goals
Goals
make run
and smoke test to verify APIs don't break after refactorExpected Outcome
Acceptance Criteria
There is a Pytest e2e Testsuite which tests for the expected outcomes in the following cases:
See https://tonybaloney.github.io/posts/async-test-patterns-for-pytest-and-unittest.html
Implementation Details
Mockups/Wireframes
No response
Product Name
project-healthcare
Organisation Name
XCoV19
Domain
Healthcare
Tech Skills Needed
CI/CD, Debugging, Python, RESTful APIs, Swagger, Test, Testing Library
Mentor(s)
@codecakes
Complexity
Medium
Category
API, Backend, Beginner Friendly, CI/CD, Testing
The text was updated successfully, but these errors were encountered: