使用来自 Safari 和 Brave 的外部身份登录用户无效。 The workaround for Safari is to disable Prevent cross-site tracking in the setting menu .还有另一个选项使用 gcloud iap 设置集,如 https://cloud.google.com/sdk/gcloud/reference/iap/settings/set 中所述。 ,我试过了,但出现了这个错误:FAILED_PRECONDITION: Precondition check failed。
我还尝试按照 https://quabr.com/59905271/how-do-you-enable-cors-requests-to-a-google-compute-engine-iap-enabled-load-bala 中的步骤操作我得到了类似的错误。
最佳答案
现在可以自定义 IAP 设置仅作为付费企业安全订阅的一部分 (BeyondCorp Enterprise)。从这个article可以看到信息.
该文章介绍了如何自定义身份识别代理 (IAP) 设置。通过这些设置,您可以控制行为,包括:
- 与 Anthos 和 Istio on Google Kubernetes Engine 的兼容性。
- 处理 CORS 预检请求。
- 如何对用户进行身份验证。
- 访问被拒绝时向用户显示的错误页面。
另一种方法是,您可以通过 adding HTTP header 在 App Engine 上支持 CORS 请求到您的 app.yaml,例如:
handlers:
- url: /
...
http_headers:
Access-Control-Allow-Origin: https://URL
# ...
Note: if you wanted to allow everyone to access your assets, you could use the wildcard '*', instead of your URL
关于google-app-engine - 无法启用对 Google App Engine IAP 的 CORS 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64704701/