mirror of
				https://github.com/juanfont/headscale.git
				synced 2025-10-28 10:51:44 +01:00 
			
		
		
		
	Merge pull request #735 from juanfont/fix-expired-url
Fix expired node registration URL
This commit is contained in:
		
						commit
						ee8f38111e
					
				
							
								
								
									
										6
									
								
								api.go
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								api.go
									
									
									
									
									
								
							| @ -603,10 +603,10 @@ func (h *Headscale) handleMachineExpired( | ||||
| 
 | ||||
| 	if h.cfg.OIDC.Issuer != "" { | ||||
| 		resp.AuthURL = fmt.Sprintf("%s/oidc/register/%s", | ||||
| 			strings.TrimSuffix(h.cfg.ServerURL, "/"), machineKey.String()) | ||||
| 			strings.TrimSuffix(h.cfg.ServerURL, "/"), NodePublicKeyStripPrefix(registerRequest.NodeKey)) | ||||
| 	} else { | ||||
| 		resp.AuthURL = fmt.Sprintf("%s/register?key=%s", | ||||
| 			strings.TrimSuffix(h.cfg.ServerURL, "/"), machineKey.String()) | ||||
| 		resp.AuthURL = fmt.Sprintf("%s/register/%s", | ||||
| 			strings.TrimSuffix(h.cfg.ServerURL, "/"), NodePublicKeyStripPrefix(registerRequest.NodeKey)) | ||||
| 	} | ||||
| 
 | ||||
| 	respBody, err := encode(resp, &machineKey, h.privateKey) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user