405 Method Not Allowed in POSTMAN


405 Method Not Allowed in POSTMAN



I was trying a GET request in postman and I got the error
405 Method Not Allowed
I have enabled websecurity in my Spring boot application
@Override
protected void configure(HttpSecurity http) throws Exception {
        http
                .csrf().disable()
                .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
                .and()
                .addFilter(new AuthorizationFilter(authenticationManager(), userRepository, wellDetailRepository, activeProfile))
                .authorizeRequests()
                // configure access rules
                .anyRequest().authenticated();

        http.headers().frameOptions().disable();
}

I had frameOptions disabled through the code
http.headers().frameOptions().disable();
I removed the above piece of code to make it to work.
The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a 

No comments:

 Python Basics How to check the version of Python interpreter mac terminal

Popular in last 30 days