Skip to content

Add API to test client IP - #12

Merged
boqiu merged 1 commit into
mainfrom
api-ip
Aug 3, 2026
Merged

Add API to test client IP#12
boqiu merged 1 commit into
mainfrom
api-ip

Conversation

@boqiu

@boqiu boqiu commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This change is Reviewable

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a small diagnostic API endpoint to return the server-detected client IP address, integrating it into the existing Gin router setup.

Changes:

  • Added GET /api/ip route that returns middleware.GetRealIP(c).
  • Introduced a new handler testClientIP to support the route.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api/route.go
Comment thread api/route.go
@boqiu
boqiu merged commit cedc747 into main Aug 3, 2026
2 checks passed
@boqiu
boqiu deleted the api-ip branch August 3, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants