我的烧瓶应用程序中的重定向(url_for)函数出现问题.
任何重定向(url_for("index"))行将应用程序从domain.com/app重定向到ip-addr/app,其中ip-addr是我自己的客户端机器ip,而不是服务器的.
这让我很困惑,我不知道问题究竟发生在哪里,因为它只发生在服务器而不是任何本地测试.
细节:
我正在使用http://flask.pocoo.org/snippets/35/中的反向代理设置.我的nginx配置是这样设置的
location /app {
proxy_set_header X-Script-Name /app;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_connect_timeout 60;
proxy_read_timeout 60;
proxy_pass http://localhost:8000/;
}
Run Code Online (Sandbox Code Playgroud)
我有一个gunicorn运行我的烧瓶应用程序作为一个暴发户的任务.任何提示?
编辑:
所以我挖了一下,发现这个git报告有类似的问题,https://github.com/omab/django-social-auth/issues/157.
Nginx - Gunicorn通过localhost(127.0.0.1:1234)为Nginx服务.不幸的是,当我使用社交平台进行身份验证时,重定向URL social-auth将它们发送到127.0.0.1:1234/twitter/complete,这显然无法通过客户端的浏览器解析.
看来我的Flask应用程序没有得到备忘录来更新其重定向路由.
我真的希望知道如何做到这一点因为我是黑莓开发的全新手.
基本上,我被要求写一篇关于黑莓如何访问像Oracle这样的数据库服务器的简短报告,我不知道黑莓是如何运作良好来解决这个问题的.我尝试在Google上搜索黑莓数据库,我总是以39.99美元的价格购买黑莓观众加app.真的很烦人.
如果有人这样做了,或者现在如何指向我任何好的文章或教程或一些代码,解释这将如何工作,这将是真棒!
我正在测试对Colaboratory的GPU支持。GPU的内存有限。
name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456 locality { }
incarnation: 14648174833476954761,
name: "/device:GPU:0"
device_type: "GPU"
memory_limit: 356515840
locality { bus_id: 1 }
incarnation: 11566567776783368174
physical_device_desc: "device: 0,
name: Tesla K80,
pci bus id: 0000:00:04.0,
compute capability: 3.7"]
Run Code Online (Sandbox Code Playgroud)
The size of the GPU memory is 356MB, I'm wondering if there is a way to get a paid version to increase the GPU memory? Perhaps this is already part of a paid google product, does anyone know what the product is?