Skip to content

Commit

Permalink
Update IP endpoint to return a text response instead of JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed May 15, 2024
1 parent 2d8d500 commit f37fe42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neon_hana/app/routers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from fastapi import APIRouter, Request
from starlette.responses import PlainTextResponse

from neon_hana.app.dependencies import client_manager

util_route = APIRouter(prefix="/util", tags=["utilities"])


@util_route.get("/client_ip")
@util_route.get("/client_ip", response_class=PlainTextResponse)
async def api_client_ip(request: Request) -> str:
client_manager.validate_auth("", request.client.host)
return request.client.host
Expand Down

0 comments on commit f37fe42

Please sign in to comment.