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

Add logging messages to CF api rewrite function. #264

Merged
merged 4 commits into from
Mar 2, 2023
Merged

Conversation

jimmie
Copy link
Member

@jimmie jimmie commented Feb 28, 2023

🗒️ Summary

Add logging messages to CF funcxtion which provide incoming URI and resulting rewrite (if applicable)

♻️ Related Issues

Log output will go to a cloudwatch log group /aws/cloudfront/function/api_uri_rewrite in the us-east-1 region

Copy link
Contributor

@alexdunnjpl alexdunnjpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimmie might be worth making the semantics of the conditional on/near L37 explicit while you're here, but otherwise LGTM

(uriParts.length > CMD_IDX && uriParts[CMD_IDX].trim() != "")

@jimmie
Copy link
Member Author

jimmie commented Mar 1, 2023

This latest rev includes conditional logging based on the presence (value is disregarded) of 'cf_debug' as a query parameter. It is removed prior to submission to the load balancer if present.

@tloubrieu-jpl tloubrieu-jpl merged commit cfde54e into main Mar 2, 2023
@tloubrieu-jpl tloubrieu-jpl deleted the cloud-tasks-31 branch March 2, 2023 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants