From e761da0b551e7489b7002cef32dd47c0e905dc80 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Tue, 1 Aug 2023 11:48:47 +0530 Subject: [PATCH] fix: Fix failing product alert API for anonymous user (#25878) Fix critical problem where public apps are redirecting to login page, because of product-alerts API not accepting anonymous users. --- .../com/appsmith/server/configurations/SecurityConfig.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/SecurityConfig.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/SecurityConfig.java index 8be937f992..3c528d6173 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/SecurityConfig.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/SecurityConfig.java @@ -51,6 +51,7 @@ import static com.appsmith.server.constants.Url.APPLICATION_URL; import static com.appsmith.server.constants.Url.ASSET_URL; import static com.appsmith.server.constants.Url.CUSTOM_JS_LIB_URL; import static com.appsmith.server.constants.Url.PAGE_URL; +import static com.appsmith.server.constants.Url.PRODUCT_ALERT; import static com.appsmith.server.constants.Url.TENANT_URL; import static com.appsmith.server.constants.Url.THEME_URL; import static com.appsmith.server.constants.Url.USAGE_PULSE_URL; @@ -182,7 +183,8 @@ public class SecurityConfig { ServerWebExchangeMatchers.pathMatchers(HttpMethod.POST, ACTION_URL + "/execute"), ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET, TENANT_URL + "/current"), ServerWebExchangeMatchers.pathMatchers(HttpMethod.POST, USAGE_PULSE_URL), - ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET, CUSTOM_JS_LIB_URL + "/*/view")) + ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET, CUSTOM_JS_LIB_URL + "/*/view"), + ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET, PRODUCT_ALERT + "/alert")) .permitAll() .pathMatchers("/public/**", "/oauth2/**", "/actuator/**") .permitAll()