File size: 1,259 Bytes
74cf889
 
a8b0080
e861fa2
74cf889
e861fa2
a8b0080
 
 
 
 
 
 
 
 
74cf889
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e861fa2
74cf889
 
 
 
 
 
 
 
 
 
 
 
 
 
 
876ad45
74cf889
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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>
            html, body {
                margin: 0;
                padding: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }

            iframe {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                border: none;
                margin: 0;
                padding: 0;
                overflow: hidden;
            }
        </style>
    </head>
    <body>
        <iframe 
            src="https://production.d2iujulgl0aoba.amplifyapp.com/" 
            allowfullscreen
            frameborder="0"
        ></iframe>
    </body>
    </html>
    """
    return HTMLResponse(content=html_content)