blob: 0be20e42c49c59c46a05dc0a5ecff4cff5f0e21c [file] [log] [blame]
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMECAST_COMMON_CORS_EXEMPT_HEADERS_H_
#define CHROMECAST_COMMON_CORS_EXEMPT_HEADERS_H_
#include "base/containers/span.h"
#include "base/strings/string_piece.h"
namespace chromecast {
// Returns the list of existing headers which pre-date CORS preflight check
// support in HTTP servers.
// TODO(b/154337552): Remove this list once all the servers support CORS
// preflight requests.
base::span<const char*> GetLegacyCorsExemptHeaders();
// Returns true if |header| is CORS exempt.
bool IsCorsExemptHeader(base::StringPiece header);
} // namespace chromecast
#endif // CHROMECAST_COMMON_CORS_EXEMPT_HEADERS_H_