Compare commits
2 Commits
5c2c3bd5dd
...
051c1a1441
Author | SHA1 | Date | |
---|---|---|---|
051c1a1441 | |||
bcf4dd27b7 |
@ -12,12 +12,14 @@ app = FastAPI(docs_url=None, redoc_url=None)
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
allow_methods=["GET"]
|
||||
allow_credentials=False,
|
||||
allow_methods=["GET"],
|
||||
allow_headers=["*"]
|
||||
)
|
||||
|
||||
|
||||
@app.get('/')
|
||||
async def shorten_url(url: Optional[str] = None):
|
||||
async def unshorten_url(url: Optional[str] = None):
|
||||
if url is None:
|
||||
return {"error": "no url provided"}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user