Skip to content

Commit

Permalink
enable logging requests (#226)
Browse files Browse the repository at this point in the history
* remove ^M line endings

* pass in kwargs to listen! instead of Listener

* doc logging requests
  • Loading branch information
bjarthur committed May 15, 2024
1 parent 3a20c21 commit d4263c9
Show file tree
Hide file tree
Showing 2 changed files with 350 additions and 341 deletions.
12 changes: 11 additions & 1 deletion docs/src/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ url_to_visit = online_url(server, "/my/nested/page")

### Secure HTTPS connections with SSL

If you boss insists your fancy webpage use the `https://` protocol, ask them
If the boss insists your fancy webpage use the `https://` protocol, ask them
for the SSL certificate and key files, and then launch your Bonito App like
this:

Expand All @@ -71,6 +71,16 @@ sslconfig = MbedTLS.SSLConfig(<path-to-SSL-certificate-file>, <path-to-SSL-key-f
Bonito.Server(main, url, port, sslconfig=sslconfig)
```

### Logging requests

You want to see who accesses all of your hard work? No problem!

```
using HTTP
access_log = HTTP.logfmt"[$time_iso8601] $remote_addr $request_uri"
Bonito.Server(main, url, port, access_log=access_log)
```

### nginx

If you need to re-route Bonito e.g. to host in parallel to PlutoSliderServer, you want a reverse-proxy like `nginx`. We did some testing with nginx and the following configuration worked for us:
Expand Down

0 comments on commit d4263c9

Please sign in to comment.