Skip to content

Commit efbc0af

Browse files
committed
Add cloudi_service_name:pattern/1 function to have the service name pattern wildcard character check in a single place.
1 parent 8b1c72e commit efbc0af

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rebar.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{deps,
55
[{cloudi_core, ".*",
66
{git, "https://github.com/CloudI/cloudi_core.git",
7-
{tag, "v1.7.4"}}},
7+
{branch, "master"}}},
88
{cowboy, ".*",
99
{git, "https://github.com/ninenines/cowboy.git",
1010
{tag, "1.1.2"}}},

src/cloudi_service_http_cowboy1.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
%%%
3232
%%% @author Michael Truog <mjtruog at protonmail dot com>
3333
%%% @copyright 2012-2018 Michael Truog
34-
%%% @version 1.7.4 {@date} {@time}
34+
%%% @version 1.7.5 {@date} {@time}
3535
%%%------------------------------------------------------------------------
3636

3737
-module(cloudi_service_http_cowboy1).
@@ -400,7 +400,7 @@ cloudi_service_init(Args, Prefix, _Timeout, Dispatcher) ->
400400
true = is_boolean(UseMethodSuffix),
401401
true = is_integer(UpdateDelaySeconds) andalso
402402
(UpdateDelaySeconds > 0) andalso (UpdateDelaySeconds =< 4294967),
403-
false = lists:member($*, Prefix),
403+
false = cloudi_service_name:pattern(Prefix),
404404
{_, Scope} = lists:keyfind(groups_scope, 1,
405405
cloudi_service:context_options(Dispatcher)),
406406
HandlerState = #cowboy1_state{

0 commit comments

Comments
 (0)