mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 06:52:52 +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
Notes:
sideshowbarker
2024-07-18 04:12:25 +09:00
Author: https://github.com/awesomekling
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