如果我使用承载令牌配置了属性Authorization
,那么InvokeHTTP会将该头发送到重定向的URL吗?
我在文档中找不到任何关于它的内容。我似乎也无法清楚地了解InvokeHTTP的底层库OkHttp的来源。
有没有办法根据URL从重定向的URL中删除标题?
我可能会很快进入“使用ExecuteGroovyScript”领域。
简短的回答是否定的,因为OkHttp strips Authorization
on redirects:
// When redirecting across hosts, drop all authentication headers. This
// is potentially annoying to the application layer since they have no
// way to retain them.
if (!sameConnection(userResponse, url)) {
requestBuilder.removeHeader("Authorization");
}