apache nginx header 删除 配置
发表于|更新于|others
apache 删除响应header
1 | Header unset Access-Control-Allow-Origin |
apache 增加header
1 | Header set Access-Control-Allow-Methods * |
nginx 增加header
1 | add_header Access-Control-Allow-Origin $http_origin always; |
文章作者: developer
文章链接: http://example.com/2020/06/29/apache%20nginx%20header%20%E5%88%A0%E9%99%A4%20%E9%85%8D%E7%BD%AE/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Dev!
相关推荐
2020-06-24
nginx 配置 转发
1234567server { listen 80; server_name geo.datav.aliyun.com; location / { proxy_pass http://geo.datav.aliyun.com; }}
2019-08-11
nginx 封禁ip 和 ip段
增加黑名单在nginx.conf同目录新建nginx.blockip.conf 引入配置可以放在虚拟机配置里,这里放在全局的nginx.confhttp里最后增加一行 12# 封禁ipinclude nginx.blockip.conf; 配置黑名单12deny 5.188.0.0/16;deny 5.188.210.5; 第一个是封禁网段,16代表ip转换为2进制后,前16位有效,只要前16位相同就会被封禁第二个是封禁具体ip
2018-01-26
PHP apache 性能测试 ab.exe 压力测试
注意apahce安装目录ab.exe可以用做性能测试,但是没有cookie等,所有测试时候需要做调整 方法1ab -n 60 -c 5 http://192.168.11.101/h5/api/ 以上为主要参数n 总的请求量c 并发数目(类似有这么多用户在访问)
2019-09-02
sublime 配置 python 环境
sublime安装和配置方法可以参考之前写的文章 安装以下插件可以构建简单的pyhon IDE环境 错误检测首先系统安装 1pip install flake8 然后安装插件 1SublimeLinter 代码提示1Anaconda 代码格式化此插件非常重要,python3极容易报警告,使用此插件后可以避免 1AutoPep8 测试代码12345678910111213141516171819202122232425import timedef fib(n): a, b = 0, 1 t = 0 while t < n: # print(a, end=' ') a, b = b, a+b t += 1 print()def fbn(n): if(n == 0 or n == 1): return n else: return fbn(n-2) + fbn(n-1)t1 = time.time()fib(100000)t2 = time.time...
2019-06-20
psd 删除 无用 元数据
123456789101112131415161718function deleteDocumentAncestorsMetadata() { whatApp = String(app.name); //String version of the app name if (whatApp.search("Photoshop") > 0) { //Check for photoshop specifically, or this will cause errors //Function Scrubs Document Ancestors from Files if (!documents.length) { alert("There are no open documents. Please open a file to run this script.") return; } if (...
2020-04-16
docker nginx 获取真实 客户端 ip
解决办法修改ports例如如下服务 123456789101112131415nginx: image: "nginx:alpine" ports: - target: 80 published: 80 protocol: tcp mode: host - target: 443 published: 443 protocol: tcp mode: host networks: backend: aliases: - "nginx" 其他介绍原文地址https://blog.csdn.net/fengyilin_henu/article/details/84912763 host模式和ingress模式介绍http://c.biancheng.net/view/3195.html 正常发布服务后,使用host模式更新服务 12345docker service update app_nginx \ --publish-rm 8...
公告
This is my Blog