Add an example showing how to use nginx as a reverse proxy.#140
Add an example showing how to use nginx as a reverse proxy.#140aantron merged 6 commits intocamlworks:masterfrom
Conversation
|
Thanks! I just started an |
aantron
left a comment
There was a problem hiding this comment.
Ok, looks good now! Thanks!
Apart from the two nits, the main remaining question is: do we have license/usage and source information for the OCaml logo used in this example?
By comparison, example w-one-binary uses a silly picture of OCaml, and "serves" together with it a README.md that says:
The camel image is taken from pixabay.com. The license
states:Free for commercial use
No attribution required
Since we don't have a separate directory in this example to put a README in, we could just put the corresponding info for the OCaml logo into a different file (or make an assets directory like in w-one-binary).
|
I've added |
|
Thanks! |
This change addresses Issue #98 by adding a new example showing how to use nginx as a reverse proxy together with Dream. To simplify setup, both nginx and the example server run in docker containers managed by docker compose. In the example, we show how to use nginx to handle requests for static assets so that that traffic never reaches the application server.
Issue #98 mentions security concerns around respecting proxy headers. The example introduced here doesn't cover those concerns so it won't allow #98 to be closed but may serve as a useful starting point for running those kinds of tests in the future.