diff options
Diffstat (limited to 'examples/ssl_hello_world/src')
-rw-r--r-- | examples/ssl_hello_world/src/ssl_hello_world_app.erl | 2 | ||||
-rw-r--r-- | examples/ssl_hello_world/src/toppage_handler.erl | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/ssl_hello_world/src/ssl_hello_world_app.erl b/examples/ssl_hello_world/src/ssl_hello_world_app.erl index 0338baf..ba42b24 100644 --- a/examples/ssl_hello_world/src/ssl_hello_world_app.erl +++ b/examples/ssl_hello_world/src/ssl_hello_world_app.erl @@ -22,7 +22,7 @@ start(_Type, _Args) -> {cacertfile, PrivDir ++ "/ssl/cowboy-ca.crt"}, {certfile, PrivDir ++ "/ssl/server.crt"}, {keyfile, PrivDir ++ "/ssl/server.key"} - ], #{env, [{dispatch, Dispatch}]}), + ], #{env => #{dispatch => Dispatch}}), ssl_hello_world_sup:start_link(). stop(_State) -> diff --git a/examples/ssl_hello_world/src/toppage_handler.erl b/examples/ssl_hello_world/src/toppage_handler.erl index e8e672e..eb95bf3 100644 --- a/examples/ssl_hello_world/src/toppage_handler.erl +++ b/examples/ssl_hello_world/src/toppage_handler.erl @@ -6,7 +6,7 @@ -export([init/2]). init(Req, Opts) -> - Req2 = cowboy_req:reply(200, [ - {<<"content-type">>, <<"text/plain">>} - ], <<"Hello world!">>, Req), - {ok, Req2, Opts}. + cowboy_req:reply(200, #{ + <<"content-type">> => <<"text/plain">> + }, <<"Hello world!">>, Req), + {ok, Req, Opts}. |