首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Streamlit已阻止请求凭据

Streamlit已阻止请求凭据
EN

Stack Overflow用户
提问于 2021-10-12 19:02:42
回答 1查看 274关注 0票数 0

我正在尝试将Streamlit应用程序部署到Windows。我成功地设置了所有环境和依赖项,并启动了它(有关如何部署应用程序的详细信息,请参阅this question)。但它会立即阻止对凭证的请求。

这是日志:

代码语言:javascript
复制
  Welcome to Streamlit!

  If you're one of our development partners or you're interested in getting
  personal technical support or Streamlit updates, please enter your email
  address below. Otherwise, you may leave the field blank.

  Email:
2021-10-11 20:56:53.202 WARNING streamlit.config:
Warning: the config option 'server.enableCORS=false' is not compatible with 'server.enableXsrfProtection=true'.
As a result, 'server.enableCORS' is being overridden to 'true'.

More information:
In order to protect against CSRF attacks, we send a cookie with each request.
To do so, we must specify allowable origins, which places a restriction on
cross-origin resource sharing.

If cross origin resource sharing is required, please disable server.enableXsrfProtection.
           
2021-10-11 20:56:53.202 DEBUG   streamlit.logger: Initialized tornado logs
2021-10-11 20:56:53.202 ERROR   streamlit.credentials:

该应用程序的执行似乎已停止,因为它正在等待一些凭据。我发现可以添加.streamlit/credentials.tomlhere,但我不确定windows上的确切位置。我还尝试在启动streamlit时显式添加--server.headless=false,但同样没有效果。

为什么应用程序不能像Linux那样自动启动,显示可以访问应用程序的地址?有没有办法在不需要用户进行额外配置的情况下启动应用程序?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-10-18 19:33:54

问题解决了,我错误地将--server.headless配置设置为false。相反,它必须是true另一个参数才能使部署正常工作:--global.developmentMode=false

完全解析here

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69545743

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档