design-look-a-likes / server.py
koenverhagen's picture
int
0b89ddd
raw
history blame
557 Bytes
from fastapi import FastAPI, Response, Request, Header, Form, UploadFile, Body
from starlette.middleware.cors import CORSMiddleware
from pydantic import BaseModel
import json
from load_data import get_design_data, get_design_resolutions_for_shop
app = FastAPI()
app.add_middleware(
CORSMiddleware,
allow_origins=["*"], # Allows all origins
allow_credentials=True,
allow_methods=["*"], # Allows all methods
allow_headers=["*"], # Allows all headers
)
# API_TOKEN = os.environ["API_TOKEN"]
API_TOKEN = '34dsadfF$$%#$TGREGEFGE%Q*)(*&%'