不通过 nginx 直接 jetty 请求地址
http://localhost:8280/ticket.json?provider_id=13&key=中文
http://localhost:8280/ticket.json?provider_id=13&key=%E4%B8%AD%E6%96%87
日志
ewei-open : ERROR 2015-10-23 10:41:10,635 com.ewei.open.auth.interceptor.AuthorizeInterceptor doAuthenticate failed, not found parameter _token, _password or _app_secret, url=localhost//ticket.json, parameters:{provider_id=13, key=中文}
通过 nginx 转发到 jetty 请求地址
http://localhost:83/api/ticket.json?provider_id=13&key=中文
http://localhost:83/api/ticket.json?provider_id=13&key=%E4%B8%AD%E6%96%87
日志
ewei-open : ERROR 2015-10-23 10:42:32,585 com.ewei.open.auth.interceptor.AuthorizeInterceptor doAuthenticate failed, not found parameter _token, _password or _app_secret, url=localhost//ticket.json, parameters:{provider_id=13,13, key=中文,中文}
nginx 配置
worker_processes 1;
events {
worker_connections 1024;
}
http {
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
underscores_in_headers on;
proxy_connect_timeout 10s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
server {
listen 83;
server_name ~^(.*)$;
location ~^/api/ {
proxy_pass http://localhost:8280;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Server-Port $server_port;
proxy_set_header X-Real-Scheme $scheme;
}
}
}