File size: 579 Bytes
2a85fa1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from flask import Flask, render_template_string

app = Flask(__name__)

@app.route('/')
def index():
    # HTML 内容,包含指向 127.0.0.1:3000 的 iframe
    html_content = """
    <!DOCTYPE html>
    <html>
    <head>
        <title>Embedded Page</title>
    </head>
    <body>
        <iframe src="http://127.0.0.1:3000" width="100%" height="600">
            <p>Your browser does not support iframes.</p>
        </iframe>
    </body>
    </html>
    """
    return render_template_string(html_content)

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=7860)