Compare commits

..

No commits in common. "051c1a14418e8344e0acca0b3ebac9bf33075591" and "5c2c3bd5dd02a175618a6cafc896c8c0c777d95d" have entirely different histories.

View File

@ -12,14 +12,12 @@ app = FastAPI(docs_url=None, redoc_url=None)
app.add_middleware( app.add_middleware(
CORSMiddleware, CORSMiddleware,
allow_origins=["*"], allow_origins=["*"],
allow_credentials=False, allow_methods=["GET"]
allow_methods=["GET"],
allow_headers=["*"]
) )
@app.get('/') @app.get('/')
async def unshorten_url(url: Optional[str] = None): async def shorten_url(url: Optional[str] = None):
if url is None: if url is None:
return {"error": "no url provided"} return {"error": "no url provided"}