Skip to content

Commit

Permalink
Merge pull request #2154 from hypothesis/docs-for-serving-h-over-ssl-…
Browse files Browse the repository at this point in the history
…in-development-2

Add docs for serving ssl in development
  • Loading branch information
gergely-ujvari committed Apr 9, 2015
2 parents 67f44d9 + 3469a07 commit 3ba8bf7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/HACKING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,25 @@ embedded in the page.

The full range of possibilities here is still in need of documentation and we
would appreciate any help to improve that.


Serving h over SSL in development
---------------------------------

If you want to annotate a site that's served over https then you'll need to
serve h over https as well, otherwise the browser will refuse to launch h and
give a mixed-content warning.

To serve your local dev instance of h over https:

1. Generate a private key and certificate signing request::

openssl req -newkey rsa:1024 -nodes -keyout key.pem -out req.pem

2. Generate a self-signed certificate::

openssl x509 -req -in req.pem -signkey key.pem -out server.crt

3. Run ``gunicorn`` with the ``certfile`` and ``keyfile`` options::

gunicorn --reload --paste conf/development.ini --certfile=server.crt --keyfile=key.pem

0 comments on commit 3ba8bf7

Please sign in to comment.