mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
policies macros
This commit is contained in:
parent
12f6709e1c
commit
5b71751391
4 changed files with 64 additions and 7 deletions
|
@ -13,7 +13,7 @@ use crate::extractors::authentication::{Policies, AuthConfig, Public, GuardedDat
|
|||
|
||||
pub fn services(cfg: &mut web::ServiceConfig) {
|
||||
let mut policies = Policies::new();
|
||||
policies.insert(Public);
|
||||
policies.insert(Public::new());
|
||||
cfg.service(
|
||||
web::resource("/indexes/{index_uid}/search")
|
||||
.app_data(AuthConfig::Auth(policies))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue