mirror of https://github.com/pixelfed/pixelfed
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			19 lines
		
	
	
		
			394 B
		
	
	
	
		
			PHP
		
	
			
		
		
	
	
			19 lines
		
	
	
		
			394 B
		
	
	
	
		
			PHP
		
	
<?php
 | 
						|
 | 
						|
namespace App\Util\Webfinger;
 | 
						|
 | 
						|
use App\Util\Lexer\Nickname;
 | 
						|
 | 
						|
class WebfingerUrl
 | 
						|
{
 | 
						|
    public static function generateWebfingerUrl($url)
 | 
						|
    {
 | 
						|
        $url = Nickname::normalizeProfileUrl($url);
 | 
						|
        $domain = $url['domain'];
 | 
						|
        $username = $url['username'];
 | 
						|
        $path = "https://{$domain}/.well-known/webfinger?resource={$username}@{$domain}";
 | 
						|
 | 
						|
        return $path;
 | 
						|
    }
 | 
						|
}
 |