带有AND的url在nginx中给出403禁止的错误

时间:2019-04-03 06:51:28

标签: django url nginx

我的nginx设置如下:

    server {
    listen      80;
    server_name 172.16.0.150 ;
    charset     utf-8;
    access_log /var/log/nginx/project.access.log;
    error_log /var/log/nginx/project.error.log info;

    client_max_body_size 1600M;

    location / {
        root /var/www/project_200;
        try_files $uri @wsgiapp;
    }

    location @wsgiapp {
        uwsgi_read_timeout 10800;

        uwsgi_pass  unix:///tmp/project.sock;
        include     /etc/nginx/uwsgi_params;
    }

    location /geoserver/ {
        proxy_set_header Host $host;
        proxy_read_timeout 600s;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://172.16.0.160:8080/geoserver/;
    }
}

当我向浏览器命中以下请求时,它显示以下 403 Forbidden 错误:

请求:

http://172.16.0.150/geoserver/wfs/?service=WFS&request=GetFeature&typeName=geonode:new_lccs&startIndex=0&count=10&maxFeatures=10&sortBy=&version=1.0.0&outputFormat=json&exceptions=application/json&CQL_FILTER=LCCS_code%20IN%20(%27BH%27%2C%20%27BNl%27%2C%20%27Ba%27)%20AND%20BBOX(the_geom,80.57373046874999,17.560246503294877,103.271484375,30.675715404167747)

响应

enter image description here

我发现,URL中的 AND 是nginx的问题。但没有任何解决办法。

0 个答案:

没有答案