mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 13:41:28 +00:00
use char *remote_addr instead of wsgi_req->remote_addr
This commit is contained in:
@@ -27,12 +27,10 @@ int uwsgi_routing_func_access(struct wsgi_request *wsgi_req, struct uwsgi_route
|
||||
|
||||
if (!strcmp(action, "access:hosts")){
|
||||
// syntax access:hosts to use hosts.allow, hosts.deny
|
||||
char *host = uwsgi_concat2n(wsgi_req->host, wsgi_req->host_len, "", 0);
|
||||
char *remote_addr = uwsgi_concat2n(wsgi_req->remote_addr, wsgi_req->remote_addr_len, "", 0);
|
||||
|
||||
pass = hosts_ctl("uwsgi", STRING_UNKNOWN, wsgi_req->remote_addr, STRING_UNKNOWN);
|
||||
pass = hosts_ctl("uwsgi", STRING_UNKNOWN, remote_addr, STRING_UNKNOWN);
|
||||
|
||||
free(host);
|
||||
free(remote_addr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user