Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Keep existing trailing slash in URL when forwarding request to insights #922

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lfu
Copy link
Contributor

@lfu lfu commented Nov 8, 2024

Started GET "/redhat_access/r/insights/platform/module-update-router/v1/channel?module=insights-core" for 10.0.167.131 at 2024-11-07 13:49:01 -0500
Started GET "/redhat_access/r/insights/v1/static/testing/insights-core.egg" for 10.0.167.131 at 2024-11-07 13:49:54 -0500
Started GET "/redhat_access/r/insights/v1/systems/327dd693-3204-460a-a398-526d14ebe243" for 10.0.167.131 at 2024-11-07 13:50:22 -0500
Started POST "/redhat_access/r/insights/uploads/327dd693-3204-460a-a398-526d14ebe243" for 10.0.167.131 at 2024-11-07 13:51:21 -0500
Started GET "/redhat_access/r/insights/platform/inventory/v1/hosts?insights_id=327dd693-3204-460a-a398-526d14ebe243" for 10.0.167.131 at 2024-11-07 13:51:45 -0500
Started GET "/redhat_access/r/insights/platform/insights/v1/system/5db40f5f-d099-4077-9d90-7337d0ef6ea5/reports/" for 10.0.167.131 at 2024-11-07 13:54:39 -0500

Among these requests forwarded to Insights, only reports has the trailing slash in the request URL.
To avoid a redirect in Insights, let's keep the trailing slash in the request URL.

original_request.path in this line would remove a trailing stash if it exists.

Fixes #895

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Requests to /api/insights/v1/system/<uuid>/reports lack trailing slash
1 participant