LibWeb+Browser: Add Debug menu action for toggling Same-Origin Policy

Sometimes it's useful to turn off the SOP for testing purposes.
Let's make that easy by having a Debug menu item for it. :^)
This commit is contained in:
Andreas Kling 2021-09-12 02:10:43 +02:00
parent c181494b19
commit 19de6bb1cc
Notes: sideshowbarker 2024-07-18 04:12:25 +09:00
5 changed files with 29 additions and 1 deletions

View file

@ -207,6 +207,10 @@ void ClientConnection::debug_request(const String& request, const String& argume
if (request == "spoof-user-agent") {
Web::ResourceLoader::the().set_user_agent(argument);
}
if (request == "same-origin-policy") {
m_page_host->page().set_same_origin_policy_enabled(argument == "on");
}
}
void ClientConnection::get_source()