cakephp3奇数行为具有外部链接,在URL参数中具有HTTPS(首先删除HTTPS)



好吧,我尝试使用LinkedIn的API,当我构建示例调用时,下面的示例

<a href="https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=123456789&redirect_uri=https://www.example.com/auth/linkedin&state=987654321">Login</a>

它在cakephp 3的前端显示这样的显示,第一个HTTPS被划带了

<a href="/oauth/v2/authorization?response_type=code&amp;client_id=123456789&redirect_uri=https://www.example.com/auth/linkedin&state=wGg4ksv8WHpx26dV">Login in</a>

一旦我从redirct_uir参数或当前显示的整个redirct_uri参数中删除https。任何人都知道如何解决这个问题或良好的工作。我需要在两个URL中都有一个HTTP,以使API正常工作。

您在查询参数中使用无效字符。我要猜测浏览器正在剥离https,因为?查询标识符之后有://字符。

您必须调用urlencode("https://www.example.com/auth/linkedin")并将结果用作查询参数。

最新更新