Laravel API的EC2服务器的下一个.js授权问题

我使用elasticbeanstalk的Laravel API和ec2的nextjs前端。问题在于授权头。来自localhost的授权头工作正常。但从ec2服务器授权头没有附加。Nginx运行在elasticeanstalk上。有什么解决办法吗?

本地主机头:

{
    "accept-language": "en-GB,en-US;q=0.9,en;q=0.8",
    "accept-encoding": "gzip, deflate",
    "referer": "http://localhost:81/",
    "origin": "http://localhost:81",
    "accept": "application/json",
    "content-type": "application/json",
    "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36",
    "authorization": "********",
    "content-length": "2",
    "x-amzn-trace-id": "Root=1-614715cb-7ef961995cc73ed53edefc56",
    "host": "***.us-east-*.elasticbeanstalk.com",
    "x-forwarded-port": "80",
    "x-forwarded-proto": "http",
    "x-forwarded-for": "xxx.xxx.xxx.xxx"
}

EC2服务器头信息:

{
    "accept-language": "en-GB,en-US;q=0.9,en;q=0.8",
    "accept-encoding": "gzip, deflate",
    "referer": "http://xx.xxx.xx.xxx/",
    "origin": "http://xx.xxx.xx.xxx",
    "accept": "application/json",
    "content-type": "application/json",
    "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36",
    "content-length": "2",
    "x-amzn-trace-id": "Root=1-614715b1-75a69852485b4edc517a4057",
    "host": "***.us-east-*.elasticbeanstalk.com",
    "x-forwarded-port": "80",
    "x-forwarded-proto": "http",
    "x-forwarded-for": "xxx.xxx.xxx.xxx"
}
阅读全文

▼ 版权说明

相关文章也很精彩
推荐内容
更多标签
相关热门
全站排行
随便看看

错说 cuoshuo.com —— 程序员的报错记录

部分内容根据CC版权协议转载;网站内容仅供参考,生产环境使用务必查阅官方文档

辽ICP备19011660号-5

×

扫码关注公众号:职场神器
发送: 1
获取永久解锁本站全部文章的验证码