hashtags (#) in URL encoded parameters decoded on redirect

后端 未结 2 2045
野趣味
野趣味 2020-12-22 11:28

I have a two server system... one hosting the app and the other hosting the authentication/authorization. When the app detects the user isn\'t logged in yet, it redirects t

相关标签:
2条回答
  • 2020-12-22 12:00

    Not sure if it is the best solution or even if you can control this, but it may work if you do double-encoding: for example, instead of "%23", make it use "%2523".

    The unwanted decoding should then convert "%2523" to "%23", leaving the desired result in the redirect URL that the browser shows.

    0 讨论(0)
  • 2020-12-22 12:12

    You need to URI-escape the "#" character.

    0 讨论(0)
提交回复
热议问题