chore: sync local changes to Gitea
This commit is contained in:
87
api-docs/geoip-api.json
Normal file
87
api-docs/geoip-api.json
Normal file
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"info": {
|
||||
"name": "geoip-api",
|
||||
"_postman_id": "c4f8a1e2-9b7d-4e3c-a1f0-2d8e6b4c9a10",
|
||||
"description": "Postman Collection v2.1 — Cloudflare Workers 访客公网 IP 与 `request.cf` 地理/网络信息。\n\n导入:Postman「Import」或 Apifox「导入」→ Postman 格式。\n仅使用集合变量 `baseUrl`(默认生产),不附带环境文件,避免与环境变量叠用冲突。\n`GET /api`、`/ipv4`、`/ipv6` 可查 `pretty=1` 美化 JSON。",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||
},
|
||||
"variable": [
|
||||
{
|
||||
"key": "baseUrl",
|
||||
"value": "https://geoip.api.smyhub.com",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"item": [
|
||||
{
|
||||
"name": "page",
|
||||
"item": [
|
||||
{
|
||||
"name": "GET /",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"url": "{{baseUrl}}/",
|
||||
"description": "首页 HTML(含 `/api?pretty=1` 示例脚本)。"
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "api",
|
||||
"item": [
|
||||
{
|
||||
"name": "GET /api",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"url": "{{baseUrl}}/api",
|
||||
"description": "JSON:`ip`、`ipVersion`、`userAgent`、`geo`、`network`、`ts`。"
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "GET /api?pretty=1",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"url": "{{baseUrl}}/api?pretty=1",
|
||||
"description": "同上,缩进格式化输出。"
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "GET /ipv4",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"url": "{{baseUrl}}/ipv4",
|
||||
"description": "仅当连接经 IPv4 到达边缘时 `ok: true`,否则 400。可 `?pretty=1`。"
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "GET /ipv6",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"url": "{{baseUrl}}/ipv6",
|
||||
"description": "仅当连接经 IPv6 到达边缘时 `ok: true`,否则 400。可 `?pretty=1`。"
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "OPTIONS /api",
|
||||
"request": {
|
||||
"method": "OPTIONS",
|
||||
"header": [],
|
||||
"url": "{{baseUrl}}/api",
|
||||
"description": "CORS 预检;响应 204 + `Access-Control-*`。"
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
name = "cf-ip-geo"
|
||||
name = "geoip-api"
|
||||
main = "worker.js"
|
||||
compatibility_date = "2026-03-05"
|
||||
|
||||
Reference in New Issue
Block a user