首页 > 系统相关 >nginx: 当HTTPS资源引入HTTP导致报错blocked:mixed-content (混合加载/Mixed Content)如何解决

nginx: 当HTTPS资源引入HTTP导致报错blocked:mixed-content (混合加载/Mixed Content)如何解决

时间:2024-02-05 22:00:26浏览次数:30  
标签:set HTTP cache Content header add 报错 proxy

location /
{
expires 12h;
if ($request_uri ~* "(php|jsp|cgi|asp|aspx)")
{
expires 0;
}
proxy_pass http://127.0.0.1:8181;
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 Cache-Control no-cache;
add_header X-Cache $upstream_cache_status;
add_header Content-Security-Policy "upgrade-insecure-requests;";

proxy_set_header Accept-Encoding "";

sub_filter_once off;

#开启缓存
#proxy_cache cache_one;
#proxy_cache_key $host$uri$is_args$args;
#proxy_cache_valid 200 304 301 302 12h;
}

标签:set,HTTP,cache,Content,header,add,报错,proxy
From: https://www.cnblogs.com/chinasoft/p/18008897

相关文章

  • chrome禁止混合内容(Mixed Content)三种解决办法
    问题描述在Chrome浏览器内,https协议的网站内加载http协议的图片,会报以下错误,图片也会加载不出来。 rust复制代码MixedContent:Thepageat'https://beef.zz.com/front/#/biz/cultivationList/cultivationDetails/5dbf836751ba4b5d9e246ad44f013200'wasloadedover......
  • 执行truncate时报错:ORA-00054:资源正忙但指定以NOWAIT 方式获取资源或者超时失效,怎样
    在执行TRUNCATE语句时出现错误,可能是由于以下原因之一:表正在被其他会话使用:如果表正在被其他会话使用,您将无法执行TRUNCATE操作。请确保没有其他会话正在使用该表,并尝试再次执行TRUNCATE。权限不足:如果您没有足够的权限来执行TRUNCATE操作,则会收到错误消息。请确保您具有足......
  • client-go http trace分析耗时
    klog.InitFlags(nil)flag.Parse()deferklog.Flush()cfg,err:=clientcmd.BuildConfigFromFlags("","/root/.kube/config")iferr!=nil{ klog.Fatalf("Errorbuildingkubeconfig:%s",err.Error())}kubeClient,err:=kubern......
  • 关于easyExcel解析未添加@ExcelProperty报错问题分析
    在一次做辅料商品导出列表的需求,并且上线之后发现,怎么商品列表的导出没有反应,一看日志,发现报错了:这里新加了两个字段用于做转换使用。因为之前很少用easyExcel,所以以为只要不加@ExcelProperty,easyExcel就不会去解析字段,没想到easyExcel还是去做了解析。源码分析通过上面的......
  • Unity打包Android报错:Target Android SDK not installed Android SDK does not includ
    1.需要查看当前unity版本中安装的SDKVersion2.找到对应路径下的文件,打开build-tools文件,其中就是对应的SDKVersion4.修改Unity中对应的配置 ......
  • Minecraft Fabric模组开发时遇到报错-Failed download after 3 attempts
    MinecraftFabric模组开发时遇到报错-Faileddownloadafter3attempts遇到的主要报错如下(当然以下只是一部分报错)Aproblemoccurredconfiguringrootproject'tuuorial_mod'.Failedtonotifyprojectevaluationlistener.FailedtosetupMinecraft,java.io.Unchecke......
  • jenkins 报错The engine "node" is incompatible with this module. Expected version
     错误是由于node版本不兼容导致的,解决方案就是忽略引擎版本的检查解决方案在前端编译的时候忽略引擎版本检测sh"yarnconfigsetregistryhttps://registry.npmmirror.com/"sh"npm-v"sh"yarn-v"sh"yarnadd......
  • c#http请求
    一、HttpWebRequestpublicstringPost(stringurl,stringdata){StreamdataStream=null;HttpWebRequestrequest=null;HttpWebResponseresponse=null;StreamReaderreader=null;......
  • [Elasticsearch] Elasticsearch 启动访问报错问题
    Elasticsearch启动访问报错问题产生的问题与解决方案环境:Windows10ES版本:8.12.0现象:双击elasticsearch.bat文件启动后,访问http://127.0.0.1:9200地址报了一个错误:receivedplaintexthttptrafficonanhttpschannel,closingconnectionNetty4HttpChannel.........
  • PyTorch下,使用list放置模块,导致计算设备不一的报错
    报错在复现Transformer代码的训练阶段时,发生报错:RuntimeError:Expectedalltensorstobeonthesamedevice,butfoundatleasttwodevices,cuda:0andcpu!解决方案通过next(linear.parameters()).device确定model已经在cuda:0上了,同时输入model.forward()的......