Skip to content

Commit

Permalink
add custom header in http ping request
Browse files Browse the repository at this point in the history
  • Loading branch information
amalshaji committed Mar 20, 2024
1 parent 1a60dcb commit d2189bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tunnel/internal/server/cron/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var ErrInactiveTunnel = fmt.Errorf("inactive tunnel")

func (c *Cron) pingHttpConnection(connection db.Connection) error {
client := resty.New().R()
resp, err := client.Get(c.config.HttpTunnelUrl(*connection.Subdomain))
resp, err := client.SetHeader("X-Portr-Ping-Request", "true").Get(c.config.HttpTunnelUrl(*connection.Subdomain))
// don't care about the error, just care about the response
if err != nil {
return nil
Expand Down

0 comments on commit d2189bf

Please sign in to comment.