Skip to content

fix(encoding): enable double slash encoding on Azure#235

Closed
nicojs wants to merge 6 commits into
mainfrom
fix/double-slash-encoding
Closed

fix(encoding): enable double slash encoding on Azure#235
nicojs wants to merge 6 commits into
mainfrom
fix/double-slash-encoding

Conversation

@nicojs

@nicojs nicojs commented May 23, 2025

Copy link
Copy Markdown
Member

Introduce a new env variable: DOUBLE_ENCODE_SLASHES_IN_PATH. When set to 'true', it double encodes slashes in the role name in the URL path. This is a workaround for IIS based Azure services middleware which seem to decode urls before passing them to the app (resulting in double decoding)

  • Data Science / AI --> Data Science %2F AI --> Data%20Science%20%252F%20AI

See https://learn.microsoft.com/en-us/answers/questions/1160320/azure-is-decoding-characters-in-the-url-before-rea

@nicojs nicojs changed the title fix(double encoding on Azure): enable double slash encoding on Azure fix(encoding): enable double slash encoding on Azure May 26, 2025
@nicojs nicojs deployed to acceptance May 26, 2025 08:36 — with GitHub Actions Active
@nicojs

nicojs commented May 26, 2025

Copy link
Copy Markdown
Member Author

This solution doesn't work. It seems that IIS doesn't decode other characters.

Data%20Science%20%252F%20AI -> Data%20Science%20%252F%20AI -> Data Science %2F AI (which doesn't exist).

Role names with a slash are not supported.

@nicojs nicojs closed this May 26, 2025
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.

1 participant