Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSSDK里面url导致的invalid signature错误 #1002

Closed
susucool527237808 opened this issue Nov 3, 2017 · 0 comments
Closed

JSSDK里面url导致的invalid signature错误 #1002

susucool527237808 opened this issue Nov 3, 2017 · 0 comments

Comments

@susucool527237808
Copy link

susucool527237808 commented Nov 3, 2017

我用的环境

Windows Apache IIS(服务器)

PHP 版本: php-7.0.12-nts
overtrue/wechat 版本:dev-master(4.0前的版本)

是否使用了框架?框架名称:
laravel

问题及现象

在开发jssdk的时候,发现一直报invalid signature错误,最后追踪到最后发现是url有问题,我发现我服务器的网址协议是http,但是开发包生成的协议确实https,最后我只有把源码改了下继续用。
不知道为什么?(就是下面这段代码,我注释了判断https部分)

描述你的问题现象,报错贴截图粘贴或者贴具体信息,提供必要的代码段
function current_url()
{
$protocol = 'http://';

// if (!empty($_SERVER['HTTPS']) || ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? 'http') === 'https') {
// $protocol = 'https://';
// }

return $protocol.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

}
如果你不提供相关的代码,我不会做任何应答,直接 close,感谢!

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

No branches or pull requests

1 participant