From 50e15c48eb597c1b3605c1f3ebce021c58b7c75d Mon Sep 17 00:00:00 2001 From: Azmat-7860 Date: Mon, 9 Nov 2026 07:50:09 +0530 Subject: [PATCH] fix(security,upload): permit /FileUpload/** to resolve 403 and increase multipart size to 500MB for video uploads --- backend/src/main/java/com/realnet/config/SecurityConfig.java | 4 ++-- backend/src/main/resources/application.properties | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/com/realnet/config/SecurityConfig.java b/backend/src/main/java/com/realnet/config/SecurityConfig.java index c8d34c1..cdff984 100644 --- a/backend/src/main/java/com/realnet/config/SecurityConfig.java +++ b/backend/src/main/java/com/realnet/config/SecurityConfig.java @@ -114,7 +114,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { web.ignoring().antMatchers("/", "/resources/**", "/static/**", "/public/**", "/webui/**", "/h2-console/**", "/configuration/**", "/swagger-ui/**", "/swagger-resources/**", "/webjars/**", "/api-docs", "/api-docs/**", "/v2/api-docs/**", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/**/*.png", - "/**/*.jpg", "/**/*.gif", "/**/*.svg", "/**/*.ico", "/**/*.ttf", "/**/*.woff", "/**/*.otf", "/FileUpload/files/**", "/FileUpload/view/**"); + "/**/*.jpg", "/**/*.gif", "/**/*.svg", "/**/*.ico", "/**/*.ttf", "/**/*.woff", "/**/*.otf", "/FileUpload/**"); } // } @@ -125,7 +125,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { // Add CORS Filter //http.cors().and().csrf().disable(). .addFilterBefore(new CorsFilter(), ChannelProcessingFilter.class) // adding backend/token for single container by Azmat 27-08 - .authorizeRequests(requests -> requests.antMatchers("/token/**", "/backend/token/**", "/**/backend/token/**", "/FileUpload/files/**", "/FileUpload/view/**").permitAll().antMatchers("/log2/**") + .authorizeRequests(requests -> requests.antMatchers("/token/**", "/backend/token/**", "/**/backend/token/**", "/FileUpload/**").permitAll().antMatchers("/log2/**") .permitAll().antMatchers("/api/**").permitAll() // .antMatchers("/SqlworkbenchSqlcont/**").hasRole("ADMIN") .anyRequest().authenticated()) diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index c246a70..2b438b3 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -62,8 +62,8 @@ spring.mail.properties.mail.smtp.socketFactory.fallback = false #******* MULTIPART RESOLVER spring.servlet.multipart.enabled=true -spring.servlet.multipart.max-file-size=100MB -spring.servlet.multipart.max-request-size=100MB +spring.servlet.multipart.max-file-size=500MB +spring.servlet.multipart.max-request-size=500MB #***************OAUTH2 SOCIAL LOGIN ********* # Social login provider props