Skip to content

Commit 3b21ccf

Browse files
committed
Added new "provider" fields.
1 parent 0199af2 commit 3b21ccf

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 IP2Location.com
3+
Copyright (c) 2021 IP2Location.com
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ $ip2proxy_proxy_asn;
129129
$ip2proxy_proxy_as;
130130
$ip2proxy_last_seen;
131131
$ip2proxy_threat;
132+
$ip2proxy_provider;
132133
```
133134

134135

@@ -164,6 +165,13 @@ server {
164165
fastcgi_param IP2PROXY_ISP $ip2proxy_isp;
165166
fastcgi_param IP2PROXY_IS_PROXY $ip2proxy_is_proxy;
166167
fastcgi_param IP2PROXY_PROXY_TYPE $ip2proxy_proxy_type;
168+
fastcgi_param IP2PROXY_DOMAIN $ip2proxy_domain;
169+
fastcgi_param IP2PROXY_USAGE_TYPE $ip2proxy_usage_type;
170+
fastcgi_param IP2PROXY_PROXY_ASN $ip2proxy_proxy_asn;
171+
fastcgi_param IP2PROXY_PROXY_AS $ip2proxy_proxy_as;
172+
fastcgi_param IP2PROXY_LAST_SEEN $ip2proxy_last_seen;
173+
fastcgi_param IP2PROXY_THREAT $ip2proxy_threat;
174+
fastcgi_param IP2PROXY_PROVIDER $ip2proxy_provider;
167175
}
168176
}
169177
```

ngx_http_ip2proxy.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* IP2Proxy Nginx module is distributed under MIT license
3-
* Copyright (c) 2013-2020 IP2Location.com. support at ip2location dot com
3+
* Copyright (c) 2013-2021 IP2Location.com. support at ip2location dot com
44
*
55
* This module is free software; you can redistribute it and/or
66
* modify it under the terms of the MIT license
@@ -168,6 +168,12 @@ ngx_http_ip2proxy_vars[] = {
168168
offsetof(IP2ProxyRecord, threat),
169169
0, 0
170170
},
171+
{
172+
ngx_string("ip2proxy_provider"), NULL,
173+
ngx_http_ip2proxy_get_str_value,
174+
offsetof(IP2ProxyRecord, provider),
175+
0, 0
176+
},
171177

172178
ngx_http_null_variable
173179
};

0 commit comments

Comments
 (0)