mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-11-03 19:30:54 +00:00 
			
		
		
		
	preliminary support for webfinger
It just echos back the subject given to it.
This commit is contained in:
		
							parent
							
								
									5faa1cae71
								
							
						
					
					
						commit
						85169dc960
					
				@ -39,5 +39,11 @@ server {
 | 
			
		||||
		client_max_body_size 20M;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# Webfinger configuration.
 | 
			
		||||
	location = /.well-known/webfinger {
 | 
			
		||||
		include fastcgi_params;
 | 
			
		||||
		fastcgi_param SCRIPT_FILENAME /usr/bin/mailinabox-webfinger.php;
 | 
			
		||||
		fastcgi_pass unix:/tmp/php-fastcgi.www-data.sock;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -31,6 +31,10 @@ rm -f /etc/init.d/php-fastcgi
 | 
			
		||||
ln -s $(pwd)/conf/phpfcgi-initscript /etc/init.d/php-fastcgi
 | 
			
		||||
update-rc.d php-fastcgi defaults
 | 
			
		||||
 | 
			
		||||
# Put our webfinger server script into a well-known location.
 | 
			
		||||
cp tools/webfinger.php /usr/bin/mailinabox-webfinger.php
 | 
			
		||||
chown www-data.www-data /usr/bin/mailinabox-webfinger.php
 | 
			
		||||
 | 
			
		||||
# Start services.
 | 
			
		||||
service nginx restart
 | 
			
		||||
service php-fastcgi restart
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										9
									
								
								tools/webfinger.php
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										9
									
								
								tools/webfinger.php
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,9 @@
 | 
			
		||||
<?php
 | 
			
		||||
	$resource = $_GET['resource'];
 | 
			
		||||
 | 
			
		||||
	header("Content-type: application/json");
 | 
			
		||||
	echo json_encode(array(
 | 
			
		||||
		subject => $resource,
 | 
			
		||||
	), JSON_PRETTY_PRINT);
 | 
			
		||||
?>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user