edited static path
This commit is contained in:
parent
4f29c98daf
commit
e7e9f5dc59
|
@ -22,9 +22,10 @@ app = FastAPI(
|
||||||
|
|
||||||
)
|
)
|
||||||
# app.mount("/static", StaticFiles(directory="static"), name="static")
|
# app.mount("/static", StaticFiles(directory="static"), name="static")
|
||||||
script_dir = os.path.dirname(__file__)
|
static_file_abspath = os.path.join(os.path.dirname(__file__), "static")
|
||||||
st_abs_file_path = os.path.join(script_dir, "static/")
|
|
||||||
app.mount("/static", StaticFiles(directory=st_abs_file_path), name="static")
|
app.mount("/static", StaticFiles(directory=static_file_abspath), name="static")
|
||||||
|
|
||||||
# Set all CORS enabled origins
|
# Set all CORS enabled origins
|
||||||
if settings.BACKEND_CORS_ORIGINS:
|
if settings.BACKEND_CORS_ORIGINS:
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
|
|
Loading…
Reference in New Issue