mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 00:11:04 +00:00 
			
		
		
		
	Merge pull request '[v7.0/forgejo] fix: respond with JSON Resource Descriptor Content-Type per RFC7033' (#2968) from bp-v7.0/forgejo-2c2f146 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2968 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
		
				commit
				
					
						7b97ea7154
					
				
			
		
					 2 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -118,4 +118,5 @@ func WebfingerQuery(ctx *context.Context) {
 | 
			
		|||
		Aliases: aliases,
 | 
			
		||||
		Links:   links,
 | 
			
		||||
	})
 | 
			
		||||
	ctx.Resp.Header().Set("Content-Type", "application/jrd+json")
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,6 +48,7 @@ func TestWebfinger(t *testing.T) {
 | 
			
		|||
 | 
			
		||||
	req := NewRequest(t, "GET", fmt.Sprintf("/.well-known/webfinger?resource=acct:%s@%s", user.LowerName, appURL.Host))
 | 
			
		||||
	resp := MakeRequest(t, req, http.StatusOK)
 | 
			
		||||
	assert.Equal(t, resp.Header().Get("Content-Type"), "application/jrd+json")
 | 
			
		||||
 | 
			
		||||
	var jrd webfingerJRD
 | 
			
		||||
	DecodeJSON(t, resp, &jrd)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue