from fastapi import FastAPI from fastapi.responses import HTMLResponse from fastapi.middleware.cors import CORSMiddleware app = FastAPI() # Add CORS middleware app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) @app.get("/", response_class=HTMLResponse) async def read_root(): html_content = """ <!DOCTYPE html> <html> <head> <title>Fullscreen IFrame</title> <style> body { background-color: #333; /* Charcoal background */ color: #fff; /* White text color for contrast */ font-family: Arial, sans-serif; margin: 0; padding: 20px; } h1 { font-size: 2em; text-align: center; transition: font-size 0.3s ease; } h1:hover { font-size: 3em; } a { color: #EA3C53; text-decoration: none; } a:hover { text-decoration: none; } </style> </head> <body> <h1><a href="https://float-app.fun/">fLoAt</h1> </body> </html> """ return HTMLResponse(content=html_content)