anchor.diff:          ?_assertEqual(?DEFAULT_ORIGIN,
               header(Headers1, "Access-Control-Allow-Origin")),
           ?_assertEqual(string_headers(?SUPPORTED_METHODS),
  -            header(Headers1, "Access-Control-Allow-Methods"))
  +            header(Headers1, "Access-Control-Allow-Methods")),
  +        ?_assertEqual(string_headers(["accept-language"]),
  +            header(Headers1, "Access-Control-Allow-Headers"))
  +    ].
  +
  +test_good_headers_preflight_request_with_custom_config_(OwnerConfig) ->
  +    Headers = [
  +        {"Origin", ?DEFAULT_ORIGIN},
  +        {"Access-Control-Request-Method", "GET"},
  +        {"Access-Control-Request-Headers", "accept-language, extra"}
  +    ],
  +    Req = mock_request('OPTIONS', "/", Headers),
  +    ?assert(chttpd_cors:is_cors_enabled(OwnerConfig)),
  +    AllowMethods = couch_util:get_value(
  +        <<"allow_methods">>, OwnerConfig, ?SUPPORTED_METHODS),
  +    AllowHeaders = couch_util:get_value(
  +        <<"allow_headers">>, OwnerConfig, ?SUPPORTED_HEADERS),
  +    {ok, Headers1} = chttpd_cors:maybe_handle_preflight_request(Req, OwnerConfig),
  +    [
  +        ?_assertEqual(?DEFAULT_ORIGIN,
  +            header(Headers1, "Access-Control-Allow-Origin")),
  +        ?_assertEqual(string_headers(AllowMethods),
  +            header(Headers1, "Access-Control-Allow-Methods")),
  +        ?_assertEqual(string_headers(["accept-language", "extra"]),
  +            header(Headers1, "Access-Control-Allow-Headers"))
       ].
   
   
  
positive.code:     "content-type, accept-ranges, etag, server, x-couch-request-id, " ++
      "x-couch-update-newrev, x-couchdb-body-time").
  
  
  %% Test helpers
  
  
negative.code:         ?_assertEqual("true",
              header(Headers1, "Access-Control-Allow-Credentials"))
      ].
  
  split_list(S) ->
      re:split(S, "\\s*,\\s*", [trim, {return, list}]).
  