Skip to content

Commit

Permalink
ATL-1832: Add rest subdomains
Browse files Browse the repository at this point in the history
  • Loading branch information
elifmeric committed Mar 27, 2024
1 parent 4fdc41d commit 75937af
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/prpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ export function makeHandler(root?: string, config?: Config): (
writePlainTextError(response, err);
}
};

/**
* 'self' does not includes subdomains
* migros.com.tr/rest become rest.migros.com.tr
* in order to use other libraries like /user-edge
*/
const restSubdomains = [
"*.rest.migros.com.tr",
"*.rest.macrocenter.com.tr",
"*.rest.tazedirekt.com",
]
const scriptSrcAllowedHosts = [
"https://*.googlesyndication.com",
"https://www.googletagservices.com",
Expand Down Expand Up @@ -165,6 +176,7 @@ export function makeHandler(root?: string, config?: Config): (
"*.adform.net",
"https://wallet.moneypay.com.tr",
"*.googleadservices.com",
"*.facebook.com",
];

const styleSrcAllowedHosts = [
Expand Down Expand Up @@ -273,6 +285,7 @@ export function makeHandler(root?: string, config?: Config): (
"www.google.com.tr",
"magaza-iphone.migros.com.tr",
"*.rubiconproject.com",
...restSubdomains,
...scriptSrcAllowedHosts
];

Expand Down

0 comments on commit 75937af

Please sign in to comment.