You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
448 B
Python

8 months ago
# -*- coding: utf-8 -*-
# @date2024/1/19 16:13
# @AuthorLiuYiJie
# @file verify_server
import uvicorn
from fastapi import FastAPI, Request
app = FastAPI()
app.debug = 'debug'
@app.get('/get/')
async def index(request: Request):
host = request.client.host
print(request.client)
return {"status": 200, "host": host, "success": True}
if __name__ == '__main__':
uvicorn.run('verify_server:app', host='0.0.0.0', port=8080)