mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-03 04:42:19 +02:00
LibWeb: Consider resource: URLs to be trustworthy and non-opaque
This makes icons once again load in the directory listings (cherry picked from commit d14888f31a8378f319efa18028083ff605105101)
This commit is contained in:
@@ -548,7 +548,8 @@ HTML::Origin url_origin(URL::URL const& url)
|
||||
}
|
||||
|
||||
// -> "file"
|
||||
if (url.scheme() == "file"sv) {
|
||||
// AD-HOC: Our resource:// is basically an alias to file://
|
||||
if (url.scheme() == "file"sv || url.scheme() == "resource"sv) {
|
||||
// Unfortunate as it is, this is left as an exercise to the reader. When in doubt, return a new opaque origin.
|
||||
// Note: We must return an origin with the `file://' protocol for `file://' iframes to work from `file://' pages.
|
||||
return HTML::Origin(url.scheme().to_byte_string(), String {}, 0);
|
||||
|
||||
Reference in New Issue
Block a user