我正在使用带有php sdk的xsolla webhooks,并且我无法使用webhooks本地运行我的代码
我知道这个错误:
"error": {
"code": "INVALID_CLIENT_IP",
"message": "Client IP address (127.0.0.1) not found in allowed IP addresses whitelist (159.255.220.240\/28, 185.30.20.16\/29, 185.30.21.0\/24, 185.30.21.16\/29). Please check troubleshooting section in README.md https:\/\/github.com\/xsolla\/xsolla-sdk-php#troubleshooting"
}我正在使用带有php sdk的xsolla webhooks,并且我无法使用webhooks本地运行我的代码
我知道这个错误:
"error": {
"code": "INVALID_CLIENT_IP",
"message": "Client IP address (127.0.0.1) not found in allowed IP addresses whitelist (159.255.220.240\/28, 185.30.20.16\/29, 185.30.21.0\/24, 185.30.21.16\/29). Please check troubleshooting section in README.md https:\/\/github.com\/xsolla\/xsolla-sdk-php#troubleshooting"
}当我添加ip地址127.0.01
就像这样:
protected static $xsollaSubnets = [
'159.255.220.240/28',
'185.30.20.16/29',
'185.30.21.0/24',
'127.0.0.1',
'185.30.21.16/29',
];它显示了另一个错误:
"error": {
"code": "INVALID_SIGNATURE",
"message": "\"Authorization\" header not found in Xsolla webhook request. Please check troubleshooting section in README.md https:\/\/github.com\/xsolla\/xsolla-sdk-php#troubleshooting"
}有人能帮上忙吗?谢谢
发布于 2022-02-04 00:30:15
带有消息的"INVALID_SIGNATURE“错误代码”在Xsollaweb钩子请求中找不到授权头“
默认情况下,Apache下的PHP不会将HTTP基本用户/ pass传递给PHP。
为了使这一工作正常进行,您需要在.htaccess或httpd.conf Apache文件中添加以下行:
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]https://stackoverflow.com/questions/70319563
复制相似问题