网站支付宝公钥文件rsa_private_key.pem如何防止用户下载?

WBOY
Release: 2016-06-06 20:24:42
Original
1452 people have browsed it

网站支付宝公钥文件rsa_private_key.pem如何防止用户下载?
比如我的网站目录结构如下:
这是支付宝相关文件
www.test.com/static/pay/rsa_private_key.pem
我在浏览器地址栏写 www.test.com/static/pay/
显示403没权限,但是当完整拼写路径(www.test.com/static/pay/rsa_private_key.pem)的时候浏览器就将该文件直接down下来了
有办法防止吗?

回复内容:

网站支付宝公钥文件rsa_private_key.pem如何防止用户下载?
比如我的网站目录结构如下:
这是支付宝相关文件
www.test.com/static/pay/rsa_private_key.pem
我在浏览器地址栏写 www.test.com/static/pay/
显示403没权限,但是当完整拼写路径(www.test.com/static/pay/rsa_private_key.pem)的时候浏览器就将该文件直接down下来了
有办法防止吗?

不要把 rsa_private_key.pem 作为静态文件 放在 static assets目录下

或者可以配置下Nginx,直接禁止请求

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template