33 lines
		
	
	
		
			785 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			785 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| <% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
 | |
| # Generated by Chef
 | |
| 
 | |
| server {
 | |
|   listen 443 ssl http2;
 | |
|   listen [::]:443 ssl http2;
 | |
|   server_name <%= @domain %>;
 | |
| 
 | |
|   root /var/www/<%= @domain %>/site/public;
 | |
| 
 | |
|   access_log off;
 | |
|   gzip_static on;
 | |
|   gzip_comp_level 5;
 | |
| 
 | |
|   add_header 'Access-Control-Allow-Origin' '*';
 | |
| 
 | |
|   ssl_certificate     <%= @ssl_cert %>;
 | |
|   ssl_certificate_key <%= @ssl_key %>;
 | |
| 
 | |
|   location /.well-known/lnurlp/ {
 | |
|     proxy_ssl_server_name on;
 | |
|     rewrite /.well-known/lnurlp/([^/]+) /lnurlpay/$1@kosmos.org break;
 | |
|     proxy_pass https://accounts.kosmos.org;
 | |
|   }
 | |
| 
 | |
|   location /.well-known/keysend/ {
 | |
|     proxy_ssl_server_name on;
 | |
|     rewrite /.well-known/keysend/([^/]+) /keysend/$1@kosmos.org break;
 | |
|     proxy_pass https://accounts.kosmos.org;
 | |
|   }
 | |
| }
 | |
| <% end -%>
 |