mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 05:10:57 +00:00 
			
		
		
		
	
		
			
	
	
		
			19 lines
		
	
	
	
		
			410 B
		
	
	
	
		
			C++
		
	
	
	
	
	
		
		
			
		
	
	
			19 lines
		
	
	
	
		
			410 B
		
	
	
	
		
			C++
		
	
	
	
	
	
|   | /*
 | ||
|  |  * Copyright (c) 2022, Linus Groh <linusg@serenityos.org> | ||
|  |  * | ||
|  |  * SPDX-License-Identifier: BSD-2-Clause | ||
|  |  */ | ||
|  | 
 | ||
|  | #include <LibWeb/Fetch/Infrastructure/URL.h>
 | ||
|  | 
 | ||
|  | namespace Web::Fetch { | ||
|  | 
 | ||
|  | // https://fetch.spec.whatwg.org/#is-local
 | ||
|  | bool is_local_url(AK::URL const& url) | ||
|  | { | ||
|  |     // A URL is local if its scheme is a local scheme.
 | ||
|  |     return any_of(LOCAL_SCHEMES, [&](auto scheme) { return url.scheme() == scheme; }); | ||
|  | } | ||
|  | 
 | ||
|  | } |