开发者

https for localhost:8080

I am trying to develop a facebook app written in Python running on Google App Engine, so i开发者_JAVA技巧 need to make my http://localhost:8080 to https://localhost:8080 since facebook is asking for a Secure Canvas URL how can i make https in localhost:8080 ?


From the docs:

The development web server does not support HTTPS connections. It ignores the secure parameter, so paths intended for use with HTTPS can be tested using regular HTTP connections to the development web server.

You can star issue 960 to request that support be added. Until then, my advice would be to run Apache or lighttpd as a proxy to the development server, and enable HTTPS on the front-end service only.


I use stunnel to proxy my https request on localserver. I run my localserver on 127.0.0.1:8000 and have configured stunnel with

[https]
accept  = 8001
connect = 8000

so it responds to https on 127.0.0.1:8001. I have configured the FB app with the above 2 ips. Works nicely. For windows, you can find the installer at here

You need to configure 2 facebook apps. 1 for the production. 1 for the local. Use the host ip to return different APP_ID for different apps on local and production.


I highly recommend deploying with nginx and gunicorn. Super-easy, and you can just make a self-signed cert to use locally. Much faster and easier than Apache.


Have a look here . I think this will answer your question

Add this to your app.yaml

handlers:

- url: #url
  script: #script
  login: required
  secure: always

more reference here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜