这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Bug: Invalid X-Bosun-Server header in bosun's http queries #2464

@svagner

Description

@svagner

Expected behavior

"X-Bosun-Server" header in bosun's HTTP requests should contain real hostname even if we set Hostname in configuration (it was such way before #2439)

Please see also #422 for some historical details

Current behavior

Before changes with the hostname, we've used hostname in the templates, internal stats and for special "X-Bosun-Server" header. For us it was like:

  • 3 boxes under LB: bosun-01, bosun-02, bosun-03
  • DNS name for balancer: bosun.domain.com.

We've set the hostname to bosun.domain.com to have the right links in templates. But we also used HTTP header "X-Bosun-Server" as the real hostname of bosun servers for delivery service. Now we can have the only hostname in the configuration for templates, stats and for the header.
Header "X-Bosun-Server" contains "bosun.domain.com" in our case.

Steps to reproduce

  1. Set Hostname in configuration equal bosun.domain.com
  2. Add notification:
notification default{
   post = http://127.0.0.1:8000/
   bodyTemplate = body
    next = default
    timeout = 1m
}
  1. Check headers

Context

Build commit - e0547ae

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions