Skip to content

Commit

Permalink
update geoip
Browse files Browse the repository at this point in the history
  • Loading branch information
noogen committed Dec 14, 2023
1 parent 700b9d5 commit 82e0743
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion files/etc/nginx/sites-enabled/1-geoip.conf
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
server {
listen 127.0.0.1:9081;
server_name localhost-geoip2;
resolver 8.8.8.8 8.8.4.4 ipv6=off;
access_log off;

location / {
charset utf-8;
add_header Cache-Control no-cache;
add_header access-control-allow-methods "OPTIONS,GET";
add_header access-control-allow-credentials "true";
add_header access-control-allow-headers "authorization,x-csrf-token,x-requested-with";

default_type application/json;
set $mybody '{"ip":"$realip","country_code":"$geoip2_country_code","region_code":"$geoip2_region_code","region_name":"$geoip2_region","city":"$geoip2_city","zip_code":"$geoip2_postal_code","latitude":"$geoip2_latitude","longitude":"$geoip2_longitude","metro_code":"$geoip2_dma_code"}';
Expand Down

0 comments on commit 82e0743

Please sign in to comment.