aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-11 00:22:48 +0300
committerGravatar Vitaly Takmazov2018-09-11 00:22:48 +0300
commit1fcef1974368b4b06cade3834156a92b819a15c1 (patch)
tree52d6cf2b25bf54ff14b70d08768d395dbdb07986 /juick-server/src/main/java/com/juick
parenta7bd0c5cd2330a84667b9762b4fd2cb35b1c20d4 (diff)
fix legacy ws endpoints
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-rw-r--r--juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java2
-rw-r--r--juick-server/src/main/java/com/juick/server/configuration/SecurityConfig.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java b/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
index d9c59aa2..19718abd 100644
--- a/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
+++ b/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
@@ -77,7 +77,7 @@ public class ApiAppConfiguration implements WebMvcConfigurer, WebSocketConfigure
@Override
public void registerWebSocketHandlers(@Nonnull WebSocketHandlerRegistry registry) {
- //((ServletWebSocketHandlerRegistry) registry).setOrder(Ordered.LOWEST_PRECEDENCE);
+ ((ServletWebSocketHandlerRegistry) registry).setOrder(Ordered.HIGHEST_PRECEDENCE);
registry.addHandler(websocketManager, "/ws/**").setAllowedOrigins("*");
}
diff --git a/juick-server/src/main/java/com/juick/server/configuration/SecurityConfig.java b/juick-server/src/main/java/com/juick/server/configuration/SecurityConfig.java
index 1c5d7835..8203e3f7 100644
--- a/juick-server/src/main/java/com/juick/server/configuration/SecurityConfig.java
+++ b/juick-server/src/main/java/com/juick/server/configuration/SecurityConfig.java
@@ -96,7 +96,7 @@ public class SecurityConfig {
.authorizeRequests()
.antMatchers(HttpMethod.OPTIONS).permitAll()
.antMatchers("/api/", "/api/messages", "/api/messages/discussions", "/api/users", "/api/thread", "/api/tags", "/api/tlgmbtwbhk", "/api/fbwbhk",
- "/api/skypebotendpoint", "/api/_fblogin", "/api/_vklogin", "/api/_tglogin", "/api/u/**", "/.well-known/webfinger").permitAll()
+ "/api/skypebotendpoint", "/api/_fblogin", "/api/_vklogin", "/api/_tglogin", "/api/u/**", "/.well-known/webfinger", "/ws/**", "/rss/**").permitAll()
.anyRequest().hasRole("USER")
.and()
.anonymous().principal(JuickUser.ANONYMOUS_USER).authorities(JuickUser.ANONYMOUS_AUTHORITY)
@@ -206,7 +206,7 @@ public class SecurityConfig {
@Override
public void configure(WebSecurity web) throws Exception {
web.debug(false);
- web.ignoring().antMatchers("/style.css*", "/scripts.js*", "/h2-console/**", "/.well-known/**", "/ws/**", "/rss/**");
+ web.ignoring().antMatchers("/style.css*", "/scripts.js*", "/h2-console/**", "/.well-known/**");
}
}
}