Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dream.run ~secret is documented but does not exist #207

Closed
tjltjl opened this issue Mar 2, 2022 · 2 comments
Closed

Dream.run ~secret is documented but does not exist #207

tjltjl opened this issue Mar 2, 2022 · 2 comments

Comments

@tjltjl
Copy link

tjltjl commented Mar 2, 2022

dream.mli in comment:

"Specify {!Dream.run} argument [~secret], or the Web app will not be able to
decrypt cookies from prior starts."

(also documented on the website)

However, the actual signature of Dream.run is different:

val run :
?interface:string ->
?port:int ->
?stop:unit promise ->
?error_handler:error_handler ->
?tls:bool ->
?certificate_file:string ->
?key_file:string ->
?builtins:bool ->
?greeting:bool ->
?adjust_terminal:bool ->
handler -> unit

@tjltjl
Copy link
Author

tjltjl commented Mar 2, 2022

The correct way appears to add the middleware "Dream.set_secret"

@aantron
Copy link
Owner

aantron commented Mar 2, 2022

Indeed, you should use Dream.set_secret. I did not catch all occurrences of ~secret when updating the docs. I'll fix that in a commit later today. Thank you very much for pointing this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants