diff --git a/deployment/docker/Caddyfile b/deployment/docker/Caddyfile index 852db0e833..743dfa8e58 100644 --- a/deployment/docker/Caddyfile +++ b/deployment/docker/Caddyfile @@ -8,7 +8,7 @@ reverse_proxy @api scrumlr-backend:8080 @frontend { - path / /static* /locales* /login* /board* /new* /timer_finished.mp3 /hotkeys.pdf /legal/* /manifest.json /service-worker.js + path / /static* /locales* /login* /board* /new* /assets/* /legal/* /manifest.json /service-worker.js } reverse_proxy @frontend scrumlr-frontend:8080 } diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 9854976d45..6729c73677 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -194,7 +194,7 @@ spec: services: - name: scrumlr-backend-PR_NUMBER port: 8080 - - match: Host(`PR_NUMBER.development.scrumlr.fra.ics.inovex.io`) && (PathPrefix(`/static`) || PathPrefix(`/locales`) || PathPrefix(`/login`) || PathPrefix(`/board`) || PathPrefix(`/new`) || PathPrefix(`/timer_finished.mp3`) || PathPrefix(`/hotkeys.pdf`) || PathPrefix(`/legal/`)) + - match: Host(`PR_NUMBER.development.scrumlr.fra.ics.inovex.io`) && (PathPrefix(`/static`) || PathPrefix(`/locales`) || PathPrefix(`/login`) || PathPrefix(`/board`) || PathPrefix(`/new`) || PathPrefix(`/assets/`) || PathPrefix(`/legal/`)) kind: Rule services: - name: scrumlr-frontend-PR_NUMBER diff --git a/nginx.conf b/nginx.conf index 64820e5ea4..f64a434a67 100644 --- a/nginx.conf +++ b/nginx.conf @@ -30,6 +30,11 @@ server { add_header Cache-Control "no-store, no-cache, must-revalidate"; } + location /assets { + try_files $uri $uri/ =404; + add_header Cache-Control "public, max-age=604800"; # cache 1 week + } + location /index.html { # Application specific feature toggles add_header Set-Cookie "scrumlr__show-legal-documents=${SCRUMLR_SHOW_LEGAL_DOCUMENTS};Path=/;Max-Age=3600"; diff --git a/public/hotkeys.pdf b/public/assets/hotkeys.pdf similarity index 100% rename from public/hotkeys.pdf rename to public/assets/hotkeys.pdf diff --git a/public/timer_finished.mp3 b/public/assets/timer_finished.mp3 similarity index 100% rename from public/timer_finished.mp3 rename to public/assets/timer_finished.mp3 diff --git a/src/components/SettingsDialog/ProfileSettings/ProfileSettings.tsx b/src/components/SettingsDialog/ProfileSettings/ProfileSettings.tsx index fc27309154..d4b08fdca5 100644 --- a/src/components/SettingsDialog/ProfileSettings/ProfileSettings.tsx +++ b/src/components/SettingsDialog/ProfileSettings/ProfileSettings.tsx @@ -59,7 +59,7 @@ export const ProfileSettings = () => { > - +

{t("Hotkeys.cheatSheet")}

diff --git a/src/components/Timer/Timer.tsx b/src/components/Timer/Timer.tsx index 67200fa796..ffc0586a26 100644 --- a/src/components/Timer/Timer.tsx +++ b/src/components/Timer/Timer.tsx @@ -39,7 +39,7 @@ export const Timer = (props: TimerProps) => { const boardId = useAppSelector((state) => state.board.data!.id); const me = useAppSelector((state) => state.participants?.self); - const [playTimesUpSound, {sound: timesUpSoundObject}] = useSound(`${process.env.PUBLIC_URL}/timer_finished.mp3`, {volume: 0.5, interrupt: true}); + const [playTimesUpSound, {sound: timesUpSoundObject}] = useSound(`${process.env.PUBLIC_URL}/assets/timer_finished.mp3`, {volume: 0.5, interrupt: true}); const [timeLeft, setTimeLeft] = useState<{h: number; m: number; s: number}>(TimerUtils.calculateTimeLeft(props.endTime)); const [elapsedTimePercentage, setElapsedTimePercentage] = useState(TimerUtils.calculateElapsedTimePercentage(props.startTime, props.endTime)); const [timesUpShouldPlay, setTimesUpShouldPlay] = useState(false);