Skip to content

Commit

Permalink
Merge pull request #115 from DemocracyClub/fix/basic-auth-deploy
Browse files Browse the repository at this point in the history
Fix/basic auth deploy
  • Loading branch information
awdem authored Dec 11, 2024
2 parents 6e4864d + 3ed480a commit 32fe231
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .circleci/tests/test_against_fqdn.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@


def make_request(url):
req = httpx.get(url, timeout=20)
dc_env = os.environ.get("DC_ENVIRONMENT")

if dc_env == "development" or dc_env == "staging":
req = httpx.get(
url,
timeout=20,
auth=("dc", "dc"),
)
else:
req = httpx.get(url, timeout=20)

req.raise_for_status()
return req

Expand Down
9 changes: 8 additions & 1 deletion template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,14 @@ Resources:
TargetOriginId: Dynamic
Compress: true
ViewerProtocolPolicy: "redirect-to-https"
CachePolicyId: 658327ea-f89d-4fab-a63d-7e88639e58f6
ForwardedValues:
QueryString: true
Cookies:
Forward: none
Headers:
- Authorization
- Origin
MinTTL: '50'
- AllowedMethods: [ GET, HEAD, OPTIONS ]
PathPattern: /i-am-a/voter/your-election-information
TargetOriginId: StaticPagesOriginGroup
Expand Down

0 comments on commit 32fe231

Please sign in to comment.