有没有任何请求无法使用Go+echo进行重定向?

huangapple go评论90阅读模式
英文:

Are there any requests that cannot be redirected with Go+echo?

问题

我正在使用Go(1.11)和echo框架开发的Web应用程序中,使用以下命令进行重定向处理:

echoContext.Redirect(http.StatusFound, targetUrl)

然而,有些请求可以成功重定向,而其他请求则无法重定向。这些请求可能是来自服务器的GET请求,是否存在无法重定向的请求?

英文:

I am using Go (1.11) and echo in the web application I am developing, and redirect processing is performed with the following command.

echoContext.Redirect(http.StatusFound,targetUrl)

However, some requests can be successfully redirected, while others are not redirected.
The request is probably a GET request from the server, is there any request that cannot be redirected?

答案1

得分: 0

显然,在cURL选项中有一个设置,它不会跟随请求目标的重定向。这很可能是原因。

英文:

Apparently there seems to be a setting in the cURL option that does not follow the redirect of the request destination.
This was probably the cause.

huangapple
  • 本文由 发表于 2022年9月29日 16:56:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/73892850.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定