From 2fd28ca5c8719564fe29f5bf63f6dbcc993a9817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 2 Dec 2021 21:07:43 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0=20nginx=20=E6=BC=94?= =?UTF-8?q?=E7=A4=BA=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/docker/nginx/nginx.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/script/docker/nginx/nginx.conf b/script/docker/nginx/nginx.conf index b4ba0317..ddd3ecc4 100644 --- a/script/docker/nginx/nginx.conf +++ b/script/docker/nginx/nginx.conf @@ -52,6 +52,16 @@ http { #ssl_prefer_server_ciphers on; # https配置参考 end + # 演示环境配置 拦截除 GET POST 之外的所有请求 + # if ($request_method !~* GET|POST) { + # rewrite ^/(.*)$ /403; + # } + + # location = /403 { + # default_type application/json; + # return 200 '{"msg":"演示模式,不允许操作","code":500}'; + # } + location / { root /usr/share/nginx/html; try_files $uri $uri/ /index.html;