mirror of
https://gitlab.com/2-chainz/2chainz.git
synced 2025-07-31 10:41:51 +00:00
Make API work with cloudflare
This commit is contained in:
@@ -6,7 +6,7 @@ from unittest.mock import patch
|
||||
from two_chainz import app
|
||||
import two_chainz
|
||||
|
||||
client = TestClient(app)
|
||||
client = TestClient(app, base_url="http://chainz.ansonbiggs.com")
|
||||
|
||||
|
||||
class TestApi:
|
||||
|
@@ -5,8 +5,14 @@ from fastapi.staticfiles import StaticFiles
|
||||
import tomllib
|
||||
from pathlib import Path
|
||||
import random
|
||||
from fastapi.middleware.trustedhost import TrustedHostMiddleware
|
||||
|
||||
|
||||
app = FastAPI()
|
||||
app.add_middleware(
|
||||
TrustedHostMiddleware, allowed_hosts=["ansonbiggs.com", "*.ansonbiggs.com"]
|
||||
)
|
||||
|
||||
start_time = time.time()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user