soiz1 commited on
Commit
a200820
·
verified ·
1 Parent(s): ca10f91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -22,6 +22,11 @@ def clone_and_setup_repo():
22
  # クローンしたディレクトリに移動してセットアップ
23
  os.chdir(temp_dir)
24
  os.system("npm i")
 
 
 
 
 
25
  os.system("cp config.example.toml config.toml")
26
  os.system("npm run build")
27
  os.system("npm start")
@@ -74,4 +79,4 @@ def check_main_js():
74
 
75
  if __name__ == '__main__':
76
  # port 7860でFlaskアプリを起動
77
- app.run(host='0.0.0.0', port=7860)
 
22
  # クローンしたディレクトリに移動してセットアップ
23
  os.chdir(temp_dir)
24
  os.system("npm i")
25
+
26
+ # server/server.ts の fastifyHelmet 設定を置換する ← 追加
27
+ print("Patching server.ts for iframe embedding...")
28
+ os.system(r"""sed -i.bak '/fastifyHelmet/s/});/ frameguard: false\\n});/' server/server.ts""")
29
+
30
  os.system("cp config.example.toml config.toml")
31
  os.system("npm run build")
32
  os.system("npm start")
 
79
 
80
  if __name__ == '__main__':
81
  # port 7860でFlaskアプリを起動
82
+ app.run(host='0.0.0.0', port=7860)