conduit: Add Element X support
This commit is contained in:
		
							parent
							
								
									355ae4b70b
								
							
						
					
					
						commit
						ab5e088016
					
				
					 1 changed files with 22 additions and 6 deletions
				
			
		|  | @ -207,12 +207,28 @@ in { | ||||||
|       merge_slashes off; |       merge_slashes off; | ||||||
|     ''; |     ''; | ||||||
| 
 | 
 | ||||||
|     locations."/_matrix" = { |     locations = { | ||||||
|       proxyPass = "http://${cfg.settings.global.address}:${toString cfg.settings.global.port}"; |       "/_matrix" = { | ||||||
|       # Recommended by conduit |         proxyPass = "http://${cfg.settings.global.address}:${toString cfg.settings.global.port}"; | ||||||
|       extraConfig = '' |         # Recommended by conduit | ||||||
|         proxy_buffering off; |         extraConfig = '' | ||||||
|       ''; |           proxy_buffering off; | ||||||
|  |         ''; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       # Add Element X support | ||||||
|  |       # TODO(tlater): Remove when no longer required: https://github.com/vector-im/element-x-android/issues/1085 | ||||||
|  |       "=/.well-known/matrix/client" = { | ||||||
|  |         alias = pkgs.writeText "well-known-matrix-client" (builtins.toJSON { | ||||||
|  |           "m.homeserver".base_url = "https://${domain}"; | ||||||
|  |           "org.matrix.msc3575.proxy".url = "https://${domain}"; | ||||||
|  |         }); | ||||||
|  | 
 | ||||||
|  |         extraConfig = '' | ||||||
|  |           default_type application/json; | ||||||
|  |           add_header Access-Control-Allow-Origin "*"; | ||||||
|  |         ''; | ||||||
|  |       }; | ||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue