Skip to content
This repository
tree: 5ab2b051c4
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 31 lines (20 sloc) 0.722 kb
layout title
default
Configurer le support SSL dans le serveur intégré

Configurer le support SSL dans le serveur intégré

Autre langages: english | ...

Probleme

Comment configurer le support SSL dans le serveur intégré de web.py, cherrypy. [Note traducteur: A préciser]

Solution

import web

from web.wsgiserver import CherryPyWSGIServer

CherryPyWSGIServer.ssl_certificate = "path/to/ssl_certificate"
CherryPyWSGIServer.ssl_private_key = "path/to/ssl_private_key"

urls = ("/.*", "hello")
app = web.application(urls, globals())

class hello:
    def GET(self):
        return 'Hello, world!'

if __name__ == "__main__":
    app.run()
Something went wrong with that request. Please try again.