Nginx快速建立IP查询接口

location /ip {
    default_type text/plain;
    return 200 $remote_addr;
}

location /json_ip {
    default_type application/json;
    return 200 "{\"ip\":\"$remote_addr\"}";
}
posted @ 2020-01-29 16:21  鱼肉真好吃  阅读(181)  评论(0编辑  收藏  举报