File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed
src/Umbraco.Cms.Integrations.OAuthProxy/Controllers Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,10 @@ private HttpClient GetClient(string serviceName)
63
63
64
64
// Shopify's endpoint (and potentially others in future) for retrieving the access token is directly coupled with the shop's name.
65
65
// As a result the address of the client needs to be updated with the request header value for the name of the shop.
66
- var serviceAddressReplaceHeader = Request . Headers . FirstOrDefault ( p => p . Key . Contains ( ServiceAddressReplacePrefixHeaderKey ) ) ;
66
+ var serviceAddressReplaceHeader = Request . Headers . FirstOrDefault ( p => p . Key . ToLowerInvariant ( ) . Contains ( ServiceAddressReplacePrefixHeaderKey ) ) ;
67
67
if ( ! serviceAddressReplaceHeader . Equals ( default ( KeyValuePair < string , StringValues > ) ) && httpClient . BaseAddress != null )
68
68
{
69
- var replaceKey = serviceAddressReplaceHeader . Key . Replace ( ServiceAddressReplacePrefixHeaderKey , string . Empty ) ;
69
+ var replaceKey = serviceAddressReplaceHeader . Key . ToLowerInvariant ( ) . Replace ( ServiceAddressReplacePrefixHeaderKey , string . Empty ) ;
70
70
71
71
var baseAddress = httpClient . BaseAddress . ToString ( ) . Replace ( $ "{ replaceKey } ", serviceAddressReplaceHeader . Value ) ;
72
72
httpClient . BaseAddress = new Uri ( baseAddress ) ;
Original file line number Diff line number Diff line change
1
+ using Microsoft . AspNetCore . Mvc ;
2
+
3
+ namespace Umbraco . Cms . Integrations . OAuthProxy . Controllers
4
+ {
5
+ [ ApiController ]
6
+ public class ShopifyComplianceController : Controller
7
+ {
8
+ /// <summary>
9
+ /// Handles customer data requests from Shopify
10
+ /// </summary>
11
+ /// <returns></returns>
12
+ [ HttpPost ]
13
+ [ Route ( "/shopify-compliance/v1/customer/data-request" ) ]
14
+ public IActionResult CustomerDataRequest ( ) => Ok ( ) ;
15
+
16
+ /// <summary>
17
+ /// Handles customer data erasure requests from Shopify
18
+ /// </summary>
19
+ /// <returns></returns>
20
+ [ HttpPost ]
21
+ [ Route ( "/shopify-compliance/v1/customer/data-redact" ) ]
22
+ public IActionResult CustomerDataRedact ( ) => Ok ( ) ;
23
+
24
+ /// <summary>
25
+ /// Handles shop data erasure requests from Shopify
26
+ /// </summary>
27
+ /// <returns></returns>
28
+ [ HttpPost ]
29
+ [ Route ( "/shopify-compliance/v1/shop/data-redact" ) ]
30
+ public IActionResult ShopDataRedact ( ) => Ok ( ) ;
31
+ }
32
+ }
You can’t perform that action at this time.
0 commit comments