Skip to content

Commit

Permalink
Merge pull request #322 from ConductionNL/development
Browse files Browse the repository at this point in the history
Development to main
  • Loading branch information
remko48 authored Jun 10, 2024
2 parents dbccbf2 + d3435e5 commit bfd6a9f
Show file tree
Hide file tree
Showing 31 changed files with 167 additions and 72 deletions.
66 changes: 66 additions & 0 deletions pwa/src/data/connectSrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
export const connectSrcStandard = `
https://api.gateway.commonground.nu
https://api.common-gateway.commonground.nu
https://raw.githubusercontent.com/ConductionNL/
https://api.github.com https://conductionnl.github.io
https://api.accept.common-gateway.commonground.nu
`;
export const connectSrcMunicipalities = `
https://albrandswaard.openwoo.app
https://albrandswaard.accept.openwoo.app
https://barendrecht.openwoo.app
https://barendrecht.accept.openwoo.app
https://buren.openwoo.app
https://buren.accept.openwoo.app
https://dinkelland.openwoo.app
https://dinkelland.accept.openwoo.app
https://epe.openwoo.app
https://epe.accept.openwoo.app
https://gooisemeren.openwoo.app
https://gooisemeren.accept.openwoo.app
https://gouda.openwoo.app
https://gouda.accept.openwoo.app
https://gemeentehw.openwoo.app
https://gemeentehw.accept.openwoo.app
https://lansingerland.openwoo.app
https://lansingerland.accept.openwoo.app
https://leiden.openwoo.app
https://leiden.accept.openwoo.app
https://moerdijk.openwoo.app
https://moerdijk.accept.openwoo.app
https://noordwijk.openwoo.app
https://noordwijk.accept.openwoo.app
https://ridderkerk.openwoo.app
https://ridderkerk.accept.openwoo.app
https://rijssen-holten.openwoo.app
https://rijssen-holten.accept.openwoo.app
https://roosendaal.openwoo.app
https://roosendaal.accept.openwoo.app
https://rotterdam.openwoo.app
https://rotterdam.accept.openwoo.app
https://stedebroec.openwoo.app
https://stedebroec.accept.openwoo.app
https://texel.openwoo.app
https://texel.accept.openwoo.app
https://tubbergen.openwoo.app
https://tubbergen.accept.openwoo.app
https://waddinxveen.openwoo.app
https://waddinxveen.accept.openwoo.app
https://zupthen.openwoo.app
https://zupthen.accept.openwoo.app
`;

export const connectSrcOther = `
https://conduction.openwoo.app
https://conduction.accept.openwoo.app
https://noaberkracht.openwoo.app
https://noaberkracht.accept.openwoo.app
https://openwoo.app
https://open-webconcept.accept.openwoo.app
https://sloterburg.openwoo.app
https://sloterburg.accept.openwoo.app
https://xxllnc.openwoo.app
https://xxllnc.accept.openwoo.app
https://zuiddrecht.openwoo.app
https://zuiddrecht.accept.openwoo.app
`;
3 changes: 2 additions & 1 deletion pwa/src/layout/Head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { getPageTitle } from "../services/getPageTitle";
import { useGatsbyContext } from "../context/gatsby";
import { useTranslation } from "react-i18next";
import { languageOptions } from "../data/languageOptions";
import { connectSrcStandard, connectSrcMunicipalities, connectSrcOther } from "../data/connectSrc";

export const Head: React.FC = () => {
const { gatsbyContext } = useGatsbyContext();
Expand Down Expand Up @@ -37,7 +38,7 @@ export const Head: React.FC = () => {
frame-src 'self';
img-src 'self' data: https://raw.githubusercontent.com/ConductionNL/;
form-action 'self';
connect-src 'self' https://api.gateway.commonground.nu https://api.common-gateway.commonground.nu https://raw.githubusercontent.com/ConductionNL/ https://api.github.com https://conductionnl.github.io https://api.accept.common-gateway.commonground.nu;
connect-src 'self' ${connectSrcStandard} ${connectSrcMunicipalities} ${connectSrcOther};
style-src 'self' 'unsafe-inline';
font-src * data:;
${location.hostname === "localhost" && "script-src 'self' 'unsafe-eval';"}
Expand Down
36 changes: 31 additions & 5 deletions pwa/src/services/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "albrandswaard.koophulpje.nl":
return Albrandswaard;
case "acceptatie-open.albrandswaard.nl":
case "albrandswaard.accept.openwoo.app":
return AlbrandswaardAccept;

case "barendrecht":
Expand All @@ -76,6 +77,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "barendrecht.koophulpje.nl":
return Barendrecht;
case "acceptatie-open.barendrecht.nl":
case "barendrecht.accept.openwoo.app":
return BarendrechtAccept;

case "buren":
Expand All @@ -84,6 +86,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "buren.koophulpje.nl":
return Buren;
case "acceptatie.open.buren.nl":
case "buren.accept.openwoo.app":
return BurenAccept;

case "dinkelland-theme":
Expand All @@ -92,6 +95,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "dinkelland.koophulpje.nl":
return Dinkelland;
case "acceptatie-open.dinkelland.nl":
case "dinkelland.accept.openwoo.app":
return DinkellandAccept;

case "epe-theme":
Expand All @@ -100,6 +104,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "epe.koophulpje.nl":
return Epe;
case "acceptatie-open.epe.nl":
case "epe.accept.openwoo.app":
return EpeAccept;

case "gooisemeren-theme":
Expand All @@ -108,6 +113,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "gooisemeren.koophulpje.nl":
return GooiseMeren;
case "acceptatie-open.gooisemeren.nl":
case "gooisemeren.accept.openwoo.app":
return GooiseMerenAccept;

case "gouda-theme":
Expand All @@ -116,14 +122,16 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "gouda.koophulpje.nl":
return Gouda;
case "acceptatie-open.gouda.nl":
case "gouda.accept.openwoo.app":
return GoudaAccept;

case "hoeksche-waard":
case "open.hoeksche-waard.nl":
case "hoeksche-waard.openwoo.app":
case "hoeksche-waard.koophulpje.nl":
case "open.gemeentehw.nl":
case "gemeentehw.openwoo.app":
case "gemeentehw.koophulpje.nl":
return HoekscheWaard;
case "acceptatie-open.hoeksche-waard.nl":
case "acceptatie-open.gemeentehw.nl":
case "gemeentehw.accept.openwoo.app":
return HoekscheWaardAccept;

case "lansingerland":
Expand All @@ -132,6 +140,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "lansingerland.koophulpje.nl":
return Lansingerland;
case "acceptatie-open.lansingerland.nl":
case "lansingerland.accept.openwoo.app":
return LansingerlandAccept;

case "leiden-theme":
Expand All @@ -140,6 +149,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "leiden.koophulpje.nl":
return Leiden;
case "acceptatie-open.leiden.nl":
case "leiden.accept.openwoo.app":
return LeidenAccept;

case "moerdijk-theme":
Expand All @@ -148,6 +158,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "moerdijk.koophulpje.nl":
return Moerdijk;
case "acceptatie-opens.moerdijk.nl":
case "moerdijk.accept.openwoo.app":
return MoerdijkAccept;

case "noordwijk-theme":
Expand All @@ -156,6 +167,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "noordwijk.koophulpje.nl":
return Noordwijk;
case "acceptatie-open.noordwijk.nl":
case "noordwijk.accept.openwoo.app":
return NoordwijkAccept;

case "ridderkerk":
Expand All @@ -164,6 +176,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "ridderkerk.koophulpje.nl":
return Ridderkerk;
case "acceptatie-open.ridderkerk.nl":
case "ridderkerk.accept.openwoo.app":
return RidderkerkAccept;

case "rijssen-holten":
Expand All @@ -172,6 +185,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "rijssen-holten.koophulpje.nl":
return RijssenHolten;
case "acceptatie-open.rijssen-holten.nl":
case "rijssen-holten.accept.openwoo.app":
return RijssenHoltenAccept;

case "roosendaal-theme":
Expand All @@ -180,6 +194,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "roosendaal.koophulpje.nl":
return Roosendaal;
case "acceptatie-open.roosendaal.nl":
case "roosendaal.accept.openwoo.app":
return RoosendaalAccept;

case "rotterdam-theme":
Expand All @@ -188,6 +203,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "rotterdam.koophulpje.nl":
return Rotterdam;
case "acceptatie-open.rotterdam.nl":
case "rotterdam.accept.openwoo.app":
return RotterdamAccept;

case "stedebroec":
Expand All @@ -196,6 +212,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "stedebroec.koophulpje.nl":
return StedeBroec;
case "acceptatie-open.stedebroec.nl":
case "stedebroec.accept.openwoo.app":
return StedeBroecAccept;

case "texel":
Expand All @@ -204,6 +221,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "texel.koophulpje.nl":
return Texel;
case "acceptatie-open.texel.nl":
case "texel.accept.openwoo.app":
return TexelAccept;

case "tubbergen-theme":
Expand All @@ -212,6 +230,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "tubbergen.koophulpje.nl":
return Tubbergen;
case "acceptatie-open.tubbergen.nl":
case "tubbergen.accept.openwoo.app":
return TubbergenAccept;

case "waddinxveen":
Expand All @@ -220,6 +239,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "waddinxveen.koophulpje.nl":
return Waddinxveen;
case "acceptatie-open.waddinxveen.nl":
case "waddinxveen.accept.openwoo.app":
return WaddinxveenAccept;

case "zutphen-theme":
Expand All @@ -228,6 +248,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "zutphen.koophulpje.nl":
return Zutphen;
case "acceptatie-open.zutphen.nl":
case "zutphen.accept.openwoo.app":
return ZutphenAccept;

// Other
Expand All @@ -236,7 +257,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "conduction.koophulpje.nl":
return Conduction;
case "acceptatie-open.conduction.nl":
case "conduction.openwoo.app":
case "conduction.accept.openwoo.app":
return ConductionAccept;

case "localhost":
Expand All @@ -248,6 +269,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "noaberkracht.koophulpje.nl":
return Noaberkracht;
case "acceptatie-open.noaberkracht.nl":
case "noaberkracht.accept.openwoo.app":
return NoaberkrachtAccept;

case "open-webconcept-theme":
Expand All @@ -256,6 +278,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "koophulpje.nl":
return OpenWebconcept;
case "acceptatie-open.open-webconcept.nl":
case "open-webconcept.accept.openwoo.app":
return OpenWebconceptAccept;

case "sloterburg-theme":
Expand All @@ -264,6 +287,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "sloterburg.koophulpje.nl":
return Sloterburg;
case "acceptatie-open.sloterburg.nl":
case "sloterburg.accept.openwoo.app":
return SloterburgAccept;

case "xxllnc-theme":
Expand All @@ -272,6 +296,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "xxllnc.koophulpje.nl":
return Xxllnc;
case "acceptatie-open.xxllnc.nl":
case "xxllnc.accept.openwoo.app":
return XxllncAccept;

case "zuiddrecht-theme":
Expand All @@ -280,6 +305,7 @@ export const getConfig = (themeOrDomainName: string): Record<string, any> | unde
case "zuiddrecht.koophulpje.nl":
return Zuiddrecht;
case "acceptatie-open.zuiddrecht.nl":
case "zuiddrecht.accept.openwoo.app":
return ZuiddrechtAccept;

default:
Expand Down
Loading

0 comments on commit bfd6a9f

Please sign in to comment.