Accept language header
-
Hello, could you add Accept language header to calls that call oidc providers?
something like this?public function request_authentication_token( $code ) {
// Add Host header – required for when the openid-connect endpoint is behind a reverse-proxy.
$parsed_url = parse_url( $this->endpoint_token );
$host = $parsed_url[‘host’];
$headerStringValue = $_SERVER[‘HTTP_ACCEPT_LANGUAGE’];$request = array(
‘body’ => array(
‘code’ => $code,
‘client_id’ => $this->client_id,
‘client_secret’ => $this->client_secret,
‘redirect_uri’ => $this->redirect_uri,
‘grant_type’ => ‘authorization_code’,
‘scope’ => $this->scope,
),
‘headers’ => array( ‘Host’ => $host, ‘Accept-Language’ => $headerStringValue ),
);
Thanks
- The topic ‘Accept language header’ is closed to new replies.