Skip to content

fix(nginx): use map directive for trailing slash redirect#2227

Open
B4nan wants to merge 1 commit intomasterfrom
claude/slack-add-queue-index-nk5XI
Open

fix(nginx): use map directive for trailing slash redirect#2227
B4nan wants to merge 1 commit intomasterfrom
claude/slack-add-queue-index-nk5XI

Conversation

@B4nan
Copy link
Member

@B4nan B4nan commented Feb 5, 2026

Previous approaches using location blocks weren't working. This uses a map directive to detect trailing slashes and a server-level if statement to redirect, which is processed before location matching.

The map captures the path without the trailing slash, and the if statement returns a 301 redirect when a trailing slash is detected.

Slack thread: https://apify.slack.com/archives/C0L33UM7Z/p1770281199186039

https://claude.ai/code/session_01GqcrG6JU9Y1YaSA5ns87Yz

Previous approaches using location blocks weren't working. This uses
a map directive to detect trailing slashes and a server-level if
statement to redirect, which is processed before location matching.

The map captures the path without the trailing slash, and the if
statement returns a 301 redirect when a trailing slash is detected.

Slack thread: https://apify.slack.com/archives/C0L33UM7Z/p1770281199186039

https://claude.ai/code/session_01GqcrG6JU9Y1YaSA5ns87Yz
@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Feb 5, 2026
@github-actions github-actions bot added this to the 133rd sprint - Tooling team milestone Feb 5, 2026
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Feb 5, 2026
@B4nan
Copy link
Member Author

B4nan commented Feb 5, 2026

I will give this a try locally first, getting tired of testing this via PRs in production.

@apify-service-account
Copy link

Preview for this PR was built for commit 70e4ed7 and is ready at https://pr-2227.preview.docs.apify.com!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants