From: Steven Riehl Date: Thu, 1 Dec 2022 17:52:21 +0000 (-0700) Subject: Add user-agent for automated input requests (#13) X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=f533c9ffe70d98e8507190889d648340c9469c6e;p=advent-of-code-24-elixir.git Add user-agent for automated input requests (#13) * Add user-agent for automated input requests * Update lib/advent_of_code/input.ex Co-authored-by: Mitchell Hanberg --- diff --git a/lib/advent_of_code/input.ex b/lib/advent_of_code/input.ex index 0b2394c..5edba2d 100644 --- a/lib/advent_of_code/input.ex +++ b/lib/advent_of_code/input.ex @@ -83,5 +83,8 @@ defmodule AdventOfCode.Input do defp allow_network?, do: Keyword.get(config(), :allow_network?, false) defp headers, - do: [{'cookie', String.to_charlist("session=" <> Keyword.get(config(), :session_cookie))}] + do: [ + {'user-agent', 'github.com/mhanberg/advent-of-code-elixir-starter by aoc@mitchellhanberg.com'}, + {'cookie', String.to_charlist("session=" <> Keyword.get(config(), :session_cookie))} + ] end