全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 374|回复: 2
打印 上一主题 下一主题

用Nginx反代之后如何改response?

[复制链接]
跳转到指定楼层
1#
发表于 2019-3-30 14:31:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 StudyOverseas 于 2019-3-30 14:45 编辑

问题和这位一样:https://github.com/getsentry/onpremise/issues/57

Nginx反代部分配置如下:
location /
{

    proxy_pass http://123.123.123.123:1234;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
    add_header X-Cache $upstream_cache_status;
    proxy_hide_header X-Frame-Options;
    sub_filter "http://" "https://";
    sub_filter_once off;
    expires 12h;
}

反代之后用https打开网页正常,浏览内容也都是正常的,但是提交表单就chrome报错(mixed content)
然后我设置了filter,但是response依旧有一部分是http://的,不知道怎么改为https://


调试信息:Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '<URL>'. This content should also be served over HTTPS


看了一下http://的都是本域名下的js文件...
2#
发表于 2019-3-30 14:32:45 | 只看该作者
sub_filter_once off;
3#
 楼主| 发表于 2019-3-30 14:42:04 | 只看该作者
xayle 发表于 2019-3-30 14:32
sub_filter_once off;

我加上了的,依旧没有用
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-15 02:29 , Processed in 0.058395 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表