cors_exempt_headers.h 794 B

123456789101112131415161718192021222324
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef CHROMECAST_COMMON_CORS_EXEMPT_HEADERS_H_
  5. #define CHROMECAST_COMMON_CORS_EXEMPT_HEADERS_H_
  6. #include "base/containers/span.h"
  7. #include "base/strings/string_piece.h"
  8. namespace chromecast {
  9. // Returns the list of existing headers which pre-date CORS preflight check
  10. // support in HTTP servers.
  11. // TODO(b/154337552): Remove this list once all the servers support CORS
  12. // preflight requests.
  13. base::span<const char*> GetLegacyCorsExemptHeaders();
  14. // Returns true if |header| is CORS exempt.
  15. bool IsCorsExemptHeader(base::StringPiece header);
  16. } // namespace chromecast
  17. #endif // CHROMECAST_COMMON_CORS_EXEMPT_HEADERS_H_