mirror of
https://github.com/TheWhiteDog9487/WebAPI.git
synced 2026-08-11 23:01:30 +08:00
扩展获取IP的API的访问重点
/ip/ip /ip/ /ip 都可以了
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "xyz.thewhitedog9487"
|
||||
version = "0.7.4"
|
||||
version = "0.7.5"
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
|
||||
@@ -23,7 +23,7 @@ class OpenAPIConfiguration {
|
||||
.contact(new Contact()
|
||||
.name("TheWhiteDog9487")
|
||||
.url("https://www.github.com/TheWhiteDog9487/WebAPI"))
|
||||
.version("0.7.4")
|
||||
.version("0.7.5")
|
||||
.license(new License()
|
||||
.name("WTFPL")
|
||||
.url("https://spdx.org/licenses/WTFPL")) )
|
||||
|
||||
@@ -38,7 +38,7 @@ class IP {
|
||||
schema = @Schema(implementation = String.class),
|
||||
examples = @ExampleObject(value = "78.141.226.247")),
|
||||
description = "成功获取到IP地址,内容为纯文本格式的IP地址")
|
||||
@GetMapping("/ip")
|
||||
@GetMapping({"/ip", "", "/"})
|
||||
ResponseEntity<String> GetIP(@RequestHeader("CF-COnnecting-IP") String Header_CFConnectingIP,
|
||||
@RequestHeader("X-Forwarded-For") String Header_XForwardedFor,
|
||||
HttpServletRequest Request) {
|
||||
|
||||
Reference in New Issue
Block a user