Skip to content

Commit

Permalink
Merge branch 'main' into malj/1932
Browse files Browse the repository at this point in the history
  • Loading branch information
millianapia authored Oct 19, 2023
2 parents 28aad4c + f837aee commit 811f805
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion sanityv3/resolveProductionUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const remoteUrl = () => {
const env = window.location.hostname.includes('equinor-web-sites-preprod') ? 'preprod' : 'prod'
switch (dataset) {
case 'global':
return `https://web-equinor-web-sites-${env}.c2.radix.equinor.com/`
return `https://web-equinor-web-sites-${env}.c2.radix.equinor.com`
case 'global-development':
return 'https://web-global-development-equinor-web-sites-dev.c2.radix.equinor.com'
case 'global-test':
Expand Down
14 changes: 9 additions & 5 deletions sanityv3/schemas/components/VideoSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,15 @@ const VideoSelector = forwardRef(function VideoSelector(
headers: {
Authorization: `Basic ${SCREEN9_AUTH}`,
},
}).then((res) =>
res.status !== 200
? setError(`Could not retrieve url from Screen9. Please report the error to the dev team.`)
: res.json(),
)
})
.then((res) =>
res.status !== 200
? setError('Could not retrieve url from Screen9. Please report the error to the dev team.')
: res.json(),
)
.catch((error) => {
setError(`Could not retrieve url from Screen9. Please report the error to the dev team. Error: ${error}`)
})

if (!data.error) {
const video = {
Expand Down
4 changes: 2 additions & 2 deletions search/IndexSanityContent/magazine/sanity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export const query = /* groq */ `*[_type == "magazine" && _lang == $lang && !(_i
"textBlocks": content[_type == "textBlock"]{
"_key": _key,
"title": select(
"isBigText" == true => {
isBigText == true =>
pt::text(bigTitle),
pt::text(title)
}),
),
"ingress": pt::text(ingress),
"text": pt::text(text) // TODO: Do this manually to cover all cases
},
Expand Down
4 changes: 2 additions & 2 deletions search/IndexSanityContent/topic/sanity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export const query = /* groq */ `*[_type match "route_" + $lang + "*" && content
"textBlocks": content->content[_type == "textBlock"]{
"_key": _key,
"title": select(
"isBigText" == true => {
isBigText == true =>
pt::text(bigTitle),
pt::text(title)
}),
),
"ingress": pt::text(ingress),
"text": pt::text(text) // TODO: Do this manually to cover all cases
},
Expand Down
11 changes: 4 additions & 7 deletions web/securityHeaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ import { dataset } from './languages.js'

const isProduction = process.env.NODE_ENV === 'production'

const envs = ['dev', 'preprod', 'prod', 'test']
const envs = ['preprod', 'prod']
const localUrl = process.env.NODE_ENV === 'development' ? 'http://localhost:3333' : ''
const globalUrl = dataset === 'global' ? 'https://equinor.sanity.studio' : ''
const secretUrl = dataset === 'secret' ? 'https://equinor-restricted.sanity.studio' : ''
const studioUrlsOldCluster = envs.map((env) => `https://studio-${dataset}-energyvision-${env}.radix.equinor.com/`)
const studioUrls = envs.map((env) => `https://studio-${dataset}-equinor-web-sites-${env}.c2.radix.equinor.com/`)
const studioUrls = envs.map((env) => `https://studio-${dataset}-equinor-web-sites-${env}.c2.radix.equinor.com`)
const studioV3Url = 'http://studiov3-global-development-equinor-web-sites-dev.c2.radix.equinor.com'
const xFrameUrls = [localUrl, ...studioUrlsOldCluster, ...studioUrls, studioV3Url, globalUrl, secretUrl]
.filter((e) => e)
.join(' ')
const xFrameUrls = [localUrl, ...studioUrls, studioV3Url, globalUrl, secretUrl].filter((e) => e).join(' ')
const edsCdnUrl = 'https://cdn.eds.equinor.com '
const iframeSrcs = [
'https://consentcdn.cookiebot.com',
Expand All @@ -30,7 +27,7 @@ const iframeSrcs = [
'https://eac.plaii.no',
'https://livestream.com',
dataset === 'global-development' && 'https://equinor-gms1.wd3.myworkdayjobs-impl.com',
dataset === 'global-development' && 'https://careers.peopleclick.eu.com/',
dataset === 'global-development' && 'https://careers.peopleclick.eu.com',
'https://h61q9gi9.api.sanity.io',
'http://localhost:3333',
]
Expand Down

0 comments on commit 811f805

Please sign in to comment.