abadesalex commited on
Commit
260777c
1 Parent(s): d34ec57

midelware hhtps

Browse files
Files changed (1) hide show
  1. Api/app/main.py +2 -0
Api/app/main.py CHANGED
@@ -9,6 +9,7 @@ from app.modules.querySearch.routes.querySearch_route import \
9
  router as query_search_routes
10
  from fastapi import APIRouter, FastAPI
11
  from fastapi.middleware.cors import CORSMiddleware
 
12
  from fastapi.responses import FileResponse
13
  from fastapi.staticfiles import StaticFiles
14
  from transformers import (AutoModel, AutoModelForMaskedLM, AutoTokenizer,
@@ -51,6 +52,7 @@ origins = [
51
 
52
  app.add_middleware(
53
  CORSMiddleware,
 
54
  allow_origins=origins,
55
  allow_credentials=True,
56
  allow_methods=["*"],
 
9
  router as query_search_routes
10
  from fastapi import APIRouter, FastAPI
11
  from fastapi.middleware.cors import CORSMiddleware
12
+ from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware
13
  from fastapi.responses import FileResponse
14
  from fastapi.staticfiles import StaticFiles
15
  from transformers import (AutoModel, AutoModelForMaskedLM, AutoTokenizer,
 
52
 
53
  app.add_middleware(
54
  CORSMiddleware,
55
+ HTTPSRedirectMiddleware,
56
  allow_origins=origins,
57
  allow_credentials=True,
58
  allow_methods=["*"],