aboutsummaryrefslogtreecommitdiffstats
path: root/src/cow_http_hd.erl
diff options
context:
space:
mode:
authorAndrei Nesterov <[email protected]>2016-03-06 17:01:18 +0300
committerAndrei Nesterov <[email protected]>2016-06-07 21:36:15 +0300
commit9e6741f6c70c8c1d71763ac0a6a8bede5382e4d8 (patch)
tree9d8ef5154c92f0bf1cd6f1156eb0d9070cafdc37 /src/cow_http_hd.erl
parent6d84ddf189b77d0317bf3db0135cfc3f83d7285f (diff)
downloadcowlib-9e6741f6c70c8c1d71763ac0a6a8bede5382e4d8.tar.gz
cowlib-9e6741f6c70c8c1d71763ac0a6a8bede5382e4d8.tar.bz2
cowlib-9e6741f6c70c8c1d71763ac0a6a8bede5382e4d8.zip
Add cow_http_hd:access_control_allow_credentials/0
Diffstat (limited to 'src/cow_http_hd.erl')
-rw-r--r--src/cow_http_hd.erl13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cow_http_hd.erl b/src/cow_http_hd.erl
index 4eac48a..d20a3c7 100644
--- a/src/cow_http_hd.erl
+++ b/src/cow_http_hd.erl
@@ -14,6 +14,7 @@
-module(cow_http_hd).
+%% Parsing.
-export([parse_accept/1]).
-export([parse_accept_charset/1]).
% @todo -export([parse_accept_datetime/1]). RFC7089
@@ -110,6 +111,9 @@
-export([parse_x_forwarded_for/1]).
% @todo -export([parse_x_frame_options/1]). RFC7034
+%% Building.
+-export([access_control_allow_credentials/0]).
+
-type etag() :: {weak | strong, binary()}.
-export_type([etag/0]).
@@ -203,6 +207,8 @@ qvalue_to_iodata(Q) when Q < 1000 -> [<<"0.">>, integer_to_binary(Q)];
qvalue_to_iodata(1000) -> <<"1">>.
-endif.
+%% Parsing.
+
%% @doc Parse the Accept header.
-spec parse_accept(binary()) -> [{media_type(), qvalue(), [binary() | {binary(), binary()}]}].
@@ -3209,6 +3215,13 @@ parse_x_forwarded_for_error_test_() ->
[{V, fun() -> {'EXIT', _} = (catch parse_x_forwarded_for(V)) end} || V <- Tests].
-endif.
+%% Building.
+
+%% @doc Build the Access-Control-Allow-Credentials header.
+
+-spec access_control_allow_credentials() -> iodata().
+access_control_allow_credentials() -> <<"true">>.
+
%% Internal.
%% Only return if the list is not empty.