Skip to content

Commit e718fd5

Browse files
acoumbAndyButland
andauthored
Update src/Umbraco.Cms.Integrations.OAuthProxy/Controllers/OAuthProxyController.cs
Co-authored-by: Andy Butland <[email protected]>
1 parent da8494d commit e718fd5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Umbraco.Cms.Integrations.OAuthProxy/Controllers/OAuthProxyController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ private HttpClient GetClient(string serviceName)
6969
{
7070
var httpClient = _httpClientFactory.CreateClient($"{serviceName}Token");
7171

72+
// Shopify's endpoint (and potentially others in future) for retrieving the access token is directly coupled with the shop's name.
73+
// As a result the address of the client needs to be updated with the request header value for the name of the shop.
7274
var serviceAddressReplaceHeader = Request.Headers.FirstOrDefault(p => p.Key.Contains(ServiceAddressReplacePrefixHeaderKey));
7375
if (!serviceAddressReplaceHeader.Equals(default(KeyValuePair<string, StringValues>)) && httpClient.BaseAddress != null)
7476
{

0 commit comments

Comments
 (0)