|
@@ -154,17 +154,17 @@
|
|
%% ```
|
|
%% ```
|
|
%% %% Serve cowboy/priv/www/index.html as http://example.com/
|
|
%% %% Serve cowboy/priv/www/index.html as http://example.com/
|
|
%% {"/", cowboy_static,
|
|
%% {"/", cowboy_static,
|
|
-%% [{directory, {priv_dir, cowboy, [<<"www">>]}}
|
|
|
|
|
|
+%% [{directory, {priv_dir, cowboy, [<<"www">>]}},
|
|
%% {file, <<"index.html">>}]}
|
|
%% {file, <<"index.html">>}]}
|
|
%%
|
|
%%
|
|
%% %% Serve cowboy/priv/www/page.html under http://example.com/*/page
|
|
%% %% Serve cowboy/priv/www/page.html under http://example.com/*/page
|
|
%% {"/:_/page", cowboy_static,
|
|
%% {"/:_/page", cowboy_static,
|
|
-%% [{directory, {priv_dir, cowboy, [<<"www">>]}}
|
|
|
|
|
|
+%% [{directory, {priv_dir, cowboy, [<<"www">>]}},
|
|
%% {file, <<"page.html">>}]}.
|
|
%% {file, <<"page.html">>}]}.
|
|
%%
|
|
%%
|
|
%% %% Always serve cowboy/priv/www/other.html under http://example.com/other
|
|
%% %% Always serve cowboy/priv/www/other.html under http://example.com/other
|
|
%% {"/other/[...]", cowboy_static,
|
|
%% {"/other/[...]", cowboy_static,
|
|
-%% [{directory, {priv_dir, cowboy, [<<"www">>]}}
|
|
|
|
|
|
+%% [{directory, {priv_dir, cowboy, [<<"www">>]}},
|
|
%% {file, "other.html"}]}
|
|
%% {file, "other.html"}]}
|
|
%% '''
|
|
%% '''
|
|
-module(cowboy_static).
|
|
-module(cowboy_static).
|