mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 12:49:06 +00:00
fastapi: implement server with same back compatibility as before
This commit is contained in:
15
server/reflector/app.py
Normal file
15
server/reflector/app.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from reflector.views.rtc_offer import router as rtc_offer_router
|
||||
|
||||
# build app
|
||||
app = FastAPI()
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
# register views
|
||||
app.include_router(rtc_offer_router)
|
||||
Reference in New Issue
Block a user