# 站内信推送
location /app/PUSH_KEY {
    proxy_pass http://127.0.0.1:36302;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header X-Real-IP $remote_addr;
}

# 将请求转发到webman
location ^~ / {
    # 接口QPS插件，nginx版本需要选择：nginx openresty
    # 如需使用接口QPS插件，取消注释
    # access_by_lua_file $document_root/lua/qps.lua;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_http_version 1.1;
    proxy_set_header Connection "";
    if (!-f $request_filename){
        proxy_pass http://127.0.0.1:36300;
    }
}

# 拒绝访问所有以 .php 结尾的文件
location ~ \.php$ {
    return 404;
}

# 允许访问 .well-known 目录
location ~ ^/\.well-known/ {
  allow all;
}

# 拒绝访问所有以 . 开头的文件或目录
location ~ /\. {
    return 404;
}