fix sign
This commit is contained in:
parent
e41d73db8d
commit
5a95d64c0e
@ -19,7 +19,7 @@ init(Req0, Opts) ->
|
||||
{ok, ReqBody, Req1} = parse_body(Req0),
|
||||
Sign = cowboy_req:header(<<"sign">>, Req1, <<>>),
|
||||
BodySign = njau_bot_signer:sign(ReqBody),
|
||||
case BodySign =:= Sign of
|
||||
case BodySign =:= string:lowercase(Sign) of
|
||||
true ->
|
||||
{ok, StatusCode, Resp} = handle_request(Method, Path, ReqBody),
|
||||
lager:debug("[http_protocol] request path: ~p, post_params: ~p, response: ~ts",
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
-author("anlicheng").
|
||||
|
||||
%% API
|
||||
-export([sign/1]).
|
||||
-export([sign/1, md5/1]).
|
||||
|
||||
%% 数据签名
|
||||
-spec sign(S :: binary()) -> binary().
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user