Score:0

How to add http host header in URL?

in flag

I have web app deployed in K8 in aws & configured LoadBalancer to call the same from internet. In the Postman I call like ,

GET https://myteams.myorg.net/config Headers: Host doom.myteams.myorg.net I can convert as corresponding http request as below

GET /config HTTP/1.1 Host: myteams.myorg.net Host: doom.myteams.myorg.net

But I want to call the same from browser URL ? I tried several ways but can't successfully include a http header in the URL tried - https://myteams.myorg.net/config/doom.myteams.myorg.net but the "/config/doom.myteams.myorg.net" is being treated as params.

in flag
I cannot find any converter which converts curl or http request to URL which can be executed in browsers like chrome
in flag
To get the first request the URL might be http://doom.myteams.myorg.net/https://myteams.myorg.net/config The Host should come from the URL and the GET /xxxx is the path of the url, we can see that the Get part is weird, I would say a broken client generated that request.
Score:1
us flag

You need to add a subdomain doom.myteams.example.net to your DNS, which points to the IP address of your server.

After that, opening https://doom.myteams.example.net will get your request to the correct virtual host.

If you want this to be available for one computer only, you can edit /etc/hosts (*nix) or C:\Windows\System32\drivers\etc\hosts (Windows) and add the hostname + ip address in the file.

Score:0
cn flag

You don't.

You can't set HTTP headers as part of URL, it's not the way it works.

At best you may be able to use a browser plugin to add/set arbitrary HTTP headers, but that will depend on the browser you are using. And will be a one off test/development option.

The Host variable needs to match the host portion of the URL, this is how the Ingress controller knows which service to route the request to.

in flag
I was thining some thing like this should be possible-https://serverfault.com/questions/371907/can-you-pass-user-pass-for-http-basic-authentication-in-url-parameters/471667#471667. I need this in URL format to pass as a target to blackbox-exporter
cn flag
Yeah, except this is NOT A HOST HEADER. it is basic authentication parameters encoded in the URL - and a target that expects this. What you mean would add a parameter to EVERY URL (making them unique) AND would have to be supported by the load balancer - totally different game.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.