PotentialCORSRequest.h 608 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) 2023, Srikavin Ramkumar <me@srikavin.me>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/URL.h>
  8. #include <LibJS/Heap/GCPtr.h>
  9. #include <LibWeb/Fetch/Infrastructure/HTTP/Requests.h>
  10. #include <LibWeb/HTML/CORSSettingAttribute.h>
  11. namespace Web::HTML {
  12. enum class SameOriginFallbackFlag {
  13. No,
  14. Yes,
  15. };
  16. [[nodiscard]] JS::NonnullGCPtr<Fetch::Infrastructure::Request> create_potential_CORS_request(JS::VM&, const AK::URL&, Optional<Fetch::Infrastructure::Request::Destination>, CORSSettingAttribute, SameOriginFallbackFlag = SameOriginFallbackFlag::No);
  17. }