找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 20|回复: 2

用Nginx反代之后如何改response?

[复制链接]

111

主题

462

回帖

1277

积分

金牌会员

积分
1277
发表于 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 '[U]' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '[U]'. This content should also be served over HTTPS


看了一下http://的都是本域名下的js文件...
回复

使用道具 举报

0

主题

151

回帖

384

积分

中级会员

积分
384
发表于 2019-3-30 14:32:45 | 显示全部楼层
sub_filter_once off;
回复

使用道具 举报

111

主题

462

回帖

1277

积分

金牌会员

积分
1277
 楼主| 发表于 2019-3-30 14:42:04 | 显示全部楼层

xayle 发表于 2019-3-30 14:32

sub_filter_once off;

我加上了的,依旧没有用
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Discuz! X

GMT+8, 2025-4-22 14:48 , Processed in 0.015332 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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