Skip to content
Snippets Groups Projects

Deploy fix

1 file
+ 38
0
Compare changes
  • Side-by-side
  • Inline
/*
* Portal - A site for direct access to the Labrador system as a teacher or admin
* Copyright (C) 2020- Delft University of Technology
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package nl.tudelft.portal.config;
import java.util.Set;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.HiddenHttpMethodFilter;
@Configuration
public class FilterConfig {
@Bean
public FilterRegistrationBean<HiddenHttpMethodFilter> hiddenHttpFilter() {
FilterRegistrationBean<HiddenHttpMethodFilter> filterRegistrationBean = new FilterRegistrationBean<>(
new HiddenHttpMethodFilter());
filterRegistrationBean.setUrlPatterns(Set.of("/*", "/**"));
return filterRegistrationBean;
}
}
Loading