tracinginsights commited on
Commit
1415d69
1 Parent(s): d23d7b6

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -8
main.py CHANGED
@@ -12,27 +12,20 @@ import available_data
12
 
13
  app = FastAPI()
14
 
15
- origins = [
16
- *
17
- ]
18
-
19
  app.add_middleware(
20
  CORSMiddleware,
21
- allow_origins=origins,
22
  allow_credentials=True,
23
  allow_methods=["*"],
24
  allow_headers=["*"],
25
  )
26
 
27
-
28
  @app.get("/", response_model=None)
29
  async def root():
30
  return HTMLResponse(
31
  content="""<iframe src="https://tracinginsights-f1-analysis.hf.space" frameborder="0" style="width:100%; height:100%;" scrolling="yes" allowfullscreen:"yes"></iframe>""",
32
  status_code=200)
33
 
34
-
35
-
36
  @app.get("/years", response_model=None)
37
  def years_available() -> any:
38
  # make a list from 2018 to current year
 
12
 
13
  app = FastAPI()
14
 
 
 
 
 
15
  app.add_middleware(
16
  CORSMiddleware,
17
+ allow_origins=["*"],
18
  allow_credentials=True,
19
  allow_methods=["*"],
20
  allow_headers=["*"],
21
  )
22
 
 
23
  @app.get("/", response_model=None)
24
  async def root():
25
  return HTMLResponse(
26
  content="""<iframe src="https://tracinginsights-f1-analysis.hf.space" frameborder="0" style="width:100%; height:100%;" scrolling="yes" allowfullscreen:"yes"></iframe>""",
27
  status_code=200)
28
 
 
 
29
  @app.get("/years", response_model=None)
30
  def years_available() -> any:
31
  # make a list from 2018 to current year