https for localhost:8080

2019-03-14 20:06发布

I am trying to develop a facebook app written in Python running on Google App Engine, so i 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 ?

4条回答
Bombasti
2楼-- · 2019-03-14 20:25

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.

查看更多
等我变得足够好
3楼-- · 2019-03-14 20:33

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

查看更多
我命由我不由天
4楼-- · 2019-03-14 20:39

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.

查看更多
孤傲高冷的网名
5楼-- · 2019-03-14 20:40

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.

查看更多
登录 后发表回答