|
|
|
@ -1,14 +1,24 @@
|
|
|
|
|
import enum
|
|
|
|
|
import re
|
|
|
|
|
from typing import Any, DefaultDict, List, Optional
|
|
|
|
|
from typing import DefaultDict, List, Optional
|
|
|
|
|
|
|
|
|
|
import httpx
|
|
|
|
|
from fastapi import FastAPI, HTTPException
|
|
|
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
|
from fastapi.params import Header, Path
|
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
|
|
|
|
origins = ["http://localhost:3000", "https://display.augendre.info"]
|
|
|
|
|
|
|
|
|
|
app.add_middleware(
|
|
|
|
|
CORSMiddleware,
|
|
|
|
|
allow_origins=origins,
|
|
|
|
|
allow_credentials=True,
|
|
|
|
|
allow_methods=["*"],
|
|
|
|
|
allow_headers=["*"],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Passage(BaseModel):
|
|
|
|
|
ligne: str
|
|
|
|
|