Compare commits
	
		
			2 Commits
		
	
	
		
			39e7c703ba
			...
			aad8adf5da
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| aad8adf5da | |||
| 205a948486 | 
@@ -377,7 +377,11 @@ in
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      "md.${pubDomain}" = {
 | 
			
		||||
        locations."/".proxyPass = "http://object-ctr.${domain}:3000";
 | 
			
		||||
        locations."/" = {
 | 
			
		||||
          proxyPass = "http://object-ctr.${domain}:3000";
 | 
			
		||||
          proxyWebsockets = true;
 | 
			
		||||
          extraConfig = proxyHeaders;
 | 
			
		||||
        };
 | 
			
		||||
        useACMEHost = pubDomain;
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
@@ -415,7 +419,22 @@ in
 | 
			
		||||
      "s3.${pubDomain}" = {
 | 
			
		||||
        serverAliases = [ "*.s3.${pubDomain}" ];
 | 
			
		||||
        inherit extraConfig;
 | 
			
		||||
        locations."/".proxyPass = s3Upstream;
 | 
			
		||||
        locations = {
 | 
			
		||||
          "/".proxyPass = s3Upstream;
 | 
			
		||||
          "/gitea/packages/" = {
 | 
			
		||||
            proxyPass = s3Upstream;
 | 
			
		||||
            # HACK: Docker images need the MIME type to be correct for the manifest but Gitea
 | 
			
		||||
            # doesn't tell S3... By hiding the header we can use add_header to set Content-Type
 | 
			
		||||
            # (normally can't be set directly)
 | 
			
		||||
            extraConfig = ''
 | 
			
		||||
              proxy_hide_header Content-Type;
 | 
			
		||||
              add_header Content-Type $upstream_http_content_type always;
 | 
			
		||||
              if ($args ~ "response-content-disposition=.+filename%3D%22manifest\.json%22") {
 | 
			
		||||
                add_header Content-Type "application/vnd.docker.distribution.manifest.v2+json";
 | 
			
		||||
              }
 | 
			
		||||
            '';
 | 
			
		||||
          };
 | 
			
		||||
        };
 | 
			
		||||
        useACMEHost = pubDomain;
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user