azure-core
Loading...
Searching...
No Matches
http_sanitizer.hpp
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#pragma once
5
6#include "azure/core/url.hpp"
7
8#include <string>
9
10namespace Azure { namespace Core { namespace Http { namespace _internal {
11 class HttpSanitizer final {
15 Azure::Core::CaseInsensitiveSet m_allowedHttpHeaders;
16
20 std::set<std::string> m_allowedHttpQueryParameters;
21
22 public:
23 HttpSanitizer() = default;
24 HttpSanitizer(
25 std::set<std::string> const& allowedHttpQueryParameters,
26 Azure::Core::CaseInsensitiveSet const& allowedHttpHeaders)
27 : m_allowedHttpHeaders(allowedHttpHeaders),
28 m_allowedHttpQueryParameters(allowedHttpQueryParameters)
29 {
30 }
37 Azure::Core::Url SanitizeUrl(Url const& url) const;
46 std::string SanitizeHeader(std::string const& headerName, std::string const& headerValue) const;
47 };
48}}}} // namespace Azure::Core::Http::_internal
std::set< std::string, _internal::StringExtensions::CaseInsensitiveComparator > CaseInsensitiveSet
A type alias of std::set<std::string> with case-insensitive element comparison.
Definition case_insensitive_containers.hpp:31
Represents the location where a request will be performed.
Definition url.hpp:46
Compute the hash value for the input binary data, using SHA256, SHA384 and SHA512.
Definition azure_assert.hpp:57
Uniform Resource Locator (URL).