Upload app.py
Browse files
app.py
CHANGED
|
@@ -127,9 +127,9 @@ def _is_origin_allowed(request: Request) -> bool:
|
|
| 127 |
print("✅ 自定義驗證標頭通過")
|
| 128 |
return True
|
| 129 |
|
| 130 |
-
print("
|
| 131 |
-
print("⚠️
|
| 132 |
-
return
|
| 133 |
|
| 134 |
# 檢查其他允許的來源(一般網頁)
|
| 135 |
if origin:
|
|
|
|
| 127 |
print("✅ 自定義驗證標頭通過")
|
| 128 |
return True
|
| 129 |
|
| 130 |
+
print("❌ GAS 請求但沒有驗證標頭,拒絕請求")
|
| 131 |
+
print("⚠️ 請在 GAS 中添加 'x-organization' 或 'x-dfes-verified' 標頭")
|
| 132 |
+
return False
|
| 133 |
|
| 134 |
# 檢查其他允許的來源(一般網頁)
|
| 135 |
if origin:
|