-
Notifications
You must be signed in to change notification settings - Fork 110
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
Forward User-Agent from AWS CloudFront to catalog app #4059
Comments
Conflicting documentation 😠 😢 💢 💢
|
I think this is the Origin request policy we need: |
I think our custom solution was working, it was just the config on |
We can modify the nginx config. Detecting "Amazon CloudFront" was a convenient but temporary solution. |
This is because of an external change in the CloufFront configuration, see details GSA/data.gov#4059 (comment)
@Jin-Sun-tts was able to create our domains on cloud.gov with the revived command:
Interim report:
|
One Origin Request Policy
Three Cache Policies were created
Staging and Development have follow prod and have same settings. |
Unblocked by completion of User-agents are in the logs of |
User Story
In order to better understand the origin of requests coming to catalog app, data.gov team wants see User-Agent header info in catalog app logs.
Acceptance Criteria
[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]
AND request to
/api/action/status_show
is not cachedWHEN I run command
curl -A "my-test-user-agent" https://catalog.data.gov/api/action/status_show
THEN the access logs capture this request
AND
my-test-user-agent
is found when searching the logcurl -I https://cata.data.gov/dataset
is runWHEN the command is run for the 2nd time with random string in user-agent
curl -s -I -A "!@#$%^" https://catalog.data.gov/dataset | grep x-cache
THEN
x-cache: Hit from cloudfront
as output to show cached result is hit.Background
We want the original user-agent header info in the request instead of all requests are marked from "Amazon CloudFront", but we don't want user-agent as a cache-key to be cached against.
Security Considerations (required)
No
Sketch
Follow this AWS instruction to set up an Origin Request policy.
The text was updated successfully, but these errors were encountered: