mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:08:13 +00:00
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:
parent
c181494b19
commit
19de6bb1cc
5 changed files with 29 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue