Comments (4)
@configuration
@EnableWebSecurity
public class SpringFilterChainConfig {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.csrf(AbstractHttpConfigurer::disable);
http.cors(AbstractHttpConfigurer::disable);
return http
.authorizeHttpRequests(request -> request
.requestMatchers(HttpMethod.POST, "/api/users").permitAll()
.requestMatchers(HttpMethod.POST, "/api/users/login").permitAll()
.anyRequest()
.authenticated()
).build();
}
}
I have done this still not working is there any work around beacuse I have already implemented in my project and now I cannot change it
from spring-cloud-gateway.
What does "not work" mean? Maybe try the documented way to disable csrf? https://docs.spring.io/spring-security/reference/servlet/exploits/csrf.html#disable-csrf
from spring-cloud-gateway.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
from spring-cloud-gateway.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
from spring-cloud-gateway.
Related Issues (20)
- direct memory always increases when adding custom filter to get request body size
- Spring Cloud Gateway not allowing Encoded URL paths after Update HOT 1
- Documentation Link on spring.io for 4.1.3 does not work.
- Spring Cloud Gateway MVC, order of before and after functions. HOT 6
- Unable to integrate grpc with spring cloud gateway HOT 4
- Can't have @PostRequest with formdata in spring-cloud-gateway-mvc application
- How can i intergrate central swagger for all microservices from gateway
- problem with URL encoding
- how to use JsonToGrpc GatewayFilter HOT 5
- Noticing leaks in release of byte buffers HOT 8
- Doesn't load p12
- Gateway MVC: space character in POSTed JSON leads to IOException: insufficient data written HOT 1
- Unbale to call writeWith(Publisher<? extends DataBuffer> body) method from a filter which extends AbstractGatewayFilterFactory
- requests can affect each other between route HOT 2
- some button in dashboard does not work if we have Spring Cloud Gateway(enabled with basic auth) set in front of SCDF HOT 2
- Make client response input stream available in request attribute
- Field routesToCache inner class AdaptCachedBodyGlobalFilter maybe should be modified
- Race condition deletes routes from Gateway when invoking /actuator/gateway/refresh for a subset of routes
- Server Side event Responses from an server behind Spring-clod-gateway-mvc HOT 1
- Gateway gives error while reading response from GRPC requests "ResponseFacade cannot be cast to class HttpServerResponse"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-cloud-gateway.