From 0c0834b30fd817674cd058b835baaad373b82d3d Mon Sep 17 00:00:00 2001 From: Athou Date: Fri, 4 Apr 2025 14:25:21 +0200 Subject: [PATCH] fix bookmarklet, React 19 no longer allows 'javascript:' urls --- commafeed-client/src/pages/app/AboutPage.tsx | 2 +- commafeed-server/src/main/resources/application.properties | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/commafeed-client/src/pages/app/AboutPage.tsx b/commafeed-client/src/pages/app/AboutPage.tsx index 374b433c..d05d7c4c 100644 --- a/commafeed-client/src/pages/app/AboutPage.tsx +++ b/commafeed-client/src/pages/app/AboutPage.tsx @@ -41,7 +41,7 @@ function NextUnreadBookmarklet() { const { _ } = useLingui() const baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf("#")) - const href = `javascript:window.location.href='${baseUrl}next?category=${categoryId}&order=${order}&t='+new Date().getTime();` + const href = `${baseUrl}next?category=${categoryId}&order=${order}` return ( diff --git a/commafeed-server/src/main/resources/application.properties b/commafeed-server/src/main/resources/application.properties index da83adab..6769f783 100644 --- a/commafeed-server/src/main/resources/application.properties +++ b/commafeed-server/src/main/resources/application.properties @@ -3,13 +3,16 @@ quarkus.http.port=8082 quarkus.http.test-port=8085 quarkus.http.enable-compression=true -# static files +# http cache ## make sure the webapp is always up to date quarkus.http.filter.index-html.header."Cache-Control"=no-cache quarkus.http.filter.index-html.matches=/ ## make sure the openapi documentation is always up to date quarkus.http.filter.openapi.header."Cache-Control"=no-cache quarkus.http.filter.openapi.matches=/openapi[.](json|yaml) +## make sure /next always redirects to the next unread entry +quarkus.http.filter.next.header."Cache-Control"=no-cache +quarkus.http.filter.next.matches=/next # security quarkus.http.auth.basic=true