File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11export async function onRequestGet ( { request } ) {
22 const url = new URL ( request . url ) ;
33 const suffix = url . pathname . replace ( / ^ \/ u m a m i \/ s h a r e / , '' ) ;
4- const upstreamUrl = `https://cloud .umami.is/share${ suffix } ${ url . search } ` ;
4+ const upstreamUrl = `https://eu .umami.is/share${ suffix } ${ url . search } ` ;
55
66 // If this is a direct request to a country flag asset (we rewrote HTML to /umami/images/country/xx.png),
77 // proxy it explicitly, with a graceful fallback if the country code is missing.
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ const nextConfig = {
101101 } ,
102102 {
103103 source : '/umami/share/:path*' ,
104- destination : 'https://cloud .umami.is/share/:path*' ,
104+ destination : 'https://eu .umami.is/share/:path*' ,
105105 } ,
106106 ] ;
107107 return base ;
Original file line number Diff line number Diff line change @@ -173,8 +173,8 @@ const StatsPage = () => {
173173 // eslint-disable-next-line no-unused-vars
174174 const __iframeConfig = {
175175 src : isProd
176- ? '/umami/share/Ojsa1vCvOf0As7LU/yourselftoscience.org'
177- : 'https://cloud.umami.is/share/Ojsa1vCvOf0As7LU/yourselftoscience.org' ,
176+ ? '/umami/share/Ojsa1vCvOf0As7LU/yourselftoscience.org?theme=light '
177+ : 'https://cloud.umami.is/share/Ojsa1vCvOf0As7LU/yourselftoscience.org?theme=light ' ,
178178 sandbox : isProd
179179 ? 'allow-scripts allow-forms allow-popups allow-presentation allow-same-origin'
180180 : 'allow-scripts allow-forms allow-popups allow-presentation' ,
@@ -385,8 +385,8 @@ const StatsPage = () => {
385385 { ( ( ) => {
386386 const isProd = process . env . NODE_ENV === 'production' ;
387387 const src = isProd
388- ? '/umami/share/Ojsa1vCvOf0As7LU/yourselftoscience.org'
389- : 'https://cloud .umami.is/share/Ojsa1vCvOf0As7LU/yourselftoscience.org' ;
388+ ? '/umami/share/Ojsa1vCvOf0As7LU/yourselftoscience.org?theme=light '
389+ : 'https://eu .umami.is/share/Ojsa1vCvOf0As7LU/yourselftoscience.org?theme=light ' ;
390390 const sandbox = isProd
391391 ? 'allow-scripts allow-forms allow-popups allow-presentation allow-same-origin'
392392 : 'allow-scripts allow-forms allow-popups allow-presentation allow-same-origin' ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ export const runtime = 'edge';
33export async function GET ( request , { params } ) {
44 const url = new URL ( request . url ) ;
55 const suffix = '/' + ( ( params && Array . isArray ( params . path ) ) ? params . path . join ( '/' ) : '' ) ;
6- const upstreamUrl = `https://cloud .umami.is/share${ suffix } ${ url . search } ` ;
6+ const upstreamUrl = `https://eu .umami.is/share${ suffix } ${ url . search } ` ;
77
88 const upstreamResponse = await fetch ( upstreamUrl , {
99 method : 'GET' ,
You can’t perform that action at this time.
0 commit comments