v.0.11.3 api-server public port 8000
This commit is contained in:
@@ -7,13 +7,13 @@ from app.models import Item, dummy_items
|
||||
app = FastAPI(title="FastAPI Server", version="1.0.0")
|
||||
|
||||
# CORS middleware to allow client requests
|
||||
# app.add_middleware(
|
||||
# CORSMiddleware,
|
||||
# # allow_origins=["http://localhost:3000", "http://client:3000"],
|
||||
# allow_credentials=True,
|
||||
# allow_methods=["*"],
|
||||
# allow_headers=["*"],
|
||||
# )
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
# allow_origins=["http://localhost:3000", "http://client:3000"],
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
|
||||
@app.get("/")
|
||||
|
||||
Reference in New Issue
Block a user