https访问http的minio 图片展示不出来

问题描述:请求到的图片地址单独访问能显示,但是在网页中展示不出来

原因:https中直接访问http是不行的,需要用nginx再转发一下

nginx配置如下(注意:9000是minio默认端口,已经占用,所以这里监听9001

bash 复制代码
	server {
		listen    9001 ssl;
		server_name 172.19.129.9;
		
		ssl_certificate localhost.pem;
        ssl_certificate_key localhost-key.pem;
		
		location /defect/ {
		   proxy_pass http://172.19.129.9:9000/defect/;
		   proxy_set_header  Host       $host;
		   proxy_set_header  X-Real-IP    $remote_addr;
		   proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
		}
		
	}

Redis中存minio上传成功的url也是要替换http为https的,端口9000也要替换为9001

bash 复制代码
        String imgUrl = FileUploadUtils.uploadMinio(img);
        imgUrl = imgUrl.replace("localhost","172.19.129.9");
        imgUrl = imgUrl.replace("http","https");
        imgUrl = imgUrl.replace("9000","9001");
相关推荐
德迅云安全杨德俊12 分钟前
安全加速SCDN防护原理及其与DDoS攻击的协同防御策略方案
安全·web安全·https·ddos
水上冰石33 分钟前
测试环境生成https自签名证书tls的步骤
linux·服务器·https
徐同保1 小时前
OnlyOffice HTTPS 代理配置总结
redis·网络协议·https
zzZ··*1 小时前
自动登录上海大学校园
python·网络协议·selenium
2501_916007472 小时前
如何查看 iOS 设备系统与硬件信息,iOS系统信息显示工具
android·ios·小程序·https·uni-app·iphone·webview
一晌小贪欢2 小时前
Python 健壮性进阶:精通 TCP/IP 网络编程与 requirements.txt 的最佳实践
开发语言·网络·python·网络协议·tcp/ip·python基础·python小白
“αβ”2 小时前
UDP与TCP的区别
linux·运维·服务器·网络·网络协议·tcp/ip·udp
Hello.Reader3 小时前
Spring 新声明式 HTTP 客户端:HTTP Interface + RestClient,把“调用外部 API”写成接口
java·spring·http
IP搭子来一个3 小时前
什么是http代理,http代理的作用是什么?
网络·网络协议·http
小李独爱秋3 小时前
计算机网络经典问题透视:试述资源预留协议RSVP的工作原理?
运维·服务器·网络·网络协议·计算机网络·rsvp