On Mon, Dec 21, 2020 at 08:18:42PM +0000, John Lane wrote: > I'm testing some sites not set up in dns. I can do this with curl: > > curl 10.90.87.64 -H 'Host: this-site.com' > curl 10.90.87.64 -H 'Host: that-site.com' > > How can I achieve same in Qutebrowser? > > I've seen content.headers.custom but it isn't clear how to use it.
What about it isn't clear? It's a dictionary (mapping header names to their values) in the config. To set them in a config.py file, see: https://github.com/qutebrowser/qutebrowser/blob/master/doc/help/configuring.asciidoc#changing-settings As for setting it at runtime, either use a JSON string: :set -t content.headers.custom "{'X-Answer': '42'}" Or use the special :config-dict-* commands: :config-dict-add --replace content.headers.custom X-Answer 42 > Also, I'd like to be able to do it on the fly (when typing in the url) > if possible at all? Not when typing the URL, but you can use those commands (maybe with --temp so they don't get persisted) before opening the URL. You can also set those for a specific URL pattern by using ":set -u example.org content.headers.custom ...". Florian -- [email protected] (Mail/XMPP) | https://www.qutebrowser.org https://bruhin.software/ | https://github.com/sponsors/The-Compiler/ GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc I love long mails! | https://email.is-not-s.ms/
signature.asc
Description: PGP signature
