File size: 557 Bytes
0b89ddd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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*)(*&%'