Recherche article
This commit is contained in:
@@ -14,7 +14,7 @@ public class WebSecurityConfig {
|
||||
@Bean
|
||||
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
||||
http.authorizeHttpRequests((requests) -> requests.requestMatchers("/", "/accueil").permitAll()
|
||||
.requestMatchers("/accueil", "/login", "/inscription").permitAll()
|
||||
.requestMatchers("/accueil", "/login", "/inscription", "/searchArticle").permitAll()
|
||||
.requestMatchers("/css/**", "/images/**", "/assets/**", "/img/**", "/js/**").permitAll()
|
||||
.requestMatchers("/admin").hasRole("ADMIN")
|
||||
.anyRequest().authenticated())
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="container mt-4">
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
<form th:action="@{/searchArticle}" method="get" class="input-group">
|
||||
<form th:action="@{/searchArticle}" method="post" class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Rechercher un article par nom..." name="searchTerm" th:value="${titre}">
|
||||
<button type="submit" class="btn btn-primary">Recherche</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user