diff options
author | Loïc Hoguin <[email protected]> | 2019-09-06 12:25:02 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-09-06 12:25:02 +0200 |
commit | 42eb6bae695a7e2126d0237d9e392682547ef6dc (patch) | |
tree | 28214ba6f1e89c119bc2ee9948e59d1e2f2042a6 /test/handlers | |
parent | d14c59d905d44d0cb4a284a2b456573fc71e5a92 (diff) | |
download | cowboy-42eb6bae695a7e2126d0237d9e392682547ef6dc.tar.gz cowboy-42eb6bae695a7e2126d0237d9e392682547ef6dc.tar.bz2 cowboy-42eb6bae695a7e2126d0237d9e392682547ef6dc.zip |
Fix using custom fields in Req
Diffstat (limited to 'test/handlers')
-rw-r--r-- | test/handlers/custom_req_fields_h.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/handlers/custom_req_fields_h.erl b/test/handlers/custom_req_fields_h.erl new file mode 100644 index 0000000..8d77b2d --- /dev/null +++ b/test/handlers/custom_req_fields_h.erl @@ -0,0 +1,10 @@ +%% This module adds custom fields to the Req object. +%% It is only meant to be checked by Dialyzer. + +-module(custom_req_fields_h). + +-export([init/2]). + +-spec init(Req, Opts) -> {ok, Req, Opts} when Req::cowboy_req:req(). +init(Req, Opts) -> + {ok, Req#{'_myapp_auth_method' => pubkey}, Opts}. |