Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
12 lines
492 B
Text
12 lines
492 B
Text
export const getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => {
|
|
if (signingRegion) {
|
|
return signingRegion;
|
|
}
|
|
else if (useFipsEndpoint) {
|
|
const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\.");
|
|
const regionRegexmatchArray = hostname.match(regionRegexJs);
|
|
if (regionRegexmatchArray) {
|
|
return regionRegexmatchArray[0].slice(1, -1);
|
|
}
|
|
}
|
|
};
|