diff --git a/Provider.php b/Provider.php index 74f611d..9fac65c 100644 --- a/Provider.php +++ b/Provider.php @@ -234,6 +234,7 @@ public function getDefaultRequestOptions() return [ RequestOptions::FORM_PARAMS => $this->getParams(), RequestOptions::PROXY => $this->getConfig('proxy'), + RequestOptions::HEADERS => $this->getHeaders(), ]; } @@ -271,6 +272,15 @@ public function getParams() return $params; } + public function getHeaders(): array + { + // Without it Steam returns 403 Forbidden + return [ + 'referer' => 'https://steamcommunity.com/', + 'origin' => 'https://steamcommunity.com', + ]; + } + /** * Parse openID response to an array. *