Skip to content

Commit 3d18db7

Browse files
committed
Merge branch 'bose/3459' into staging
2 parents 70109c8 + 8f94ddb commit 3d18db7

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

web/common/helpers/redirects.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,8 @@ const dnsRedirects = [
9999
from: 'morgendagenshelter.no',
100100
to: '/no/om-oss/sponsing-og-stotte',
101101
},
102+
{
103+
from: "data.equinor.com",
104+
to:"/energy/data-sharing"
105+
}
102106
]

web/core/Promotion/Promotion.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const Promotion = forwardRef<HTMLAnchorElement, PromotionProps>(function
4141
layoutDirection === 'col' ? 'line-clamp-2' : 'line-clamp-3'
4242
}`
4343

44-
return (
44+
return href ? (
4545
<BaseLink
4646
ref={ref}
4747
type={variant === 'externalLink' ? 'externalUrl' : 'internalUrl'}
@@ -100,5 +100,5 @@ export const Promotion = forwardRef<HTMLAnchorElement, PromotionProps>(function
100100
</div>
101101
</div>
102102
</BaseLink>
103-
)
103+
) : null
104104
})

web/middleware.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const PERMANENT_REDIRECT = 301
1010
const PUBLIC_FILE = /\.(.*)$/
1111
const DOT_HTML = '.html'
1212
const IS_ARCHIVED_NEWS_DOWNLOADS = /(.*)\/news\/archive\/[0-9]{4}\/[0-9]{2}\/[0-9]{2}\/downloads\/(.*)\.(.*)$/
13+
const wwwExcludedDomains = ['localhost:3000',process.env.RADIX_PUBLIC_DOMAIN_NAME,process.env.RADIX_CANONICAL_DOMAIN_NAME,'data.equinor.com']
1314

1415
export async function middleware(request: NextRequest) {
1516
const { origin, locale } = request.nextUrl
@@ -41,9 +42,7 @@ export async function middleware(request: NextRequest) {
4142

4243
// Skip WWW redirect for Radix URLs and localhost
4344
if (
44-
host !== process.env.RADIX_PUBLIC_DOMAIN_NAME &&
45-
host !== process.env.RADIX_CANONICAL_DOMAIN_NAME &&
46-
host !== 'localhost:3000'
45+
!wwwExcludedDomains.includes(host)
4746
) {
4847
const wwwRedirect = getWWWRedirect(host, pathname)
4948
if (wwwRedirect) {

0 commit comments

Comments
 (0)