1097: disable frontend in production r=LegendreM a=MarinPostma

disable frontend in production as per #411 and https://github.com/meilisearch/specifications/blob/master/text/0001-frontend-disable-prod.md

Co-authored-by: mpostma <postma.marin@protonmail.com>
This commit is contained in:
bors[bot] 2020-11-30 14:38:48 +00:00 committed by GitHub
commit 65079f5e2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 9 deletions

View file

@ -160,7 +160,7 @@ impl Server {
eprintln!("get_request: {}", url);
let mut app =
test::init_service(meilisearch_http::create_app(&self.data).wrap(NormalizePath)).await;
test::init_service(meilisearch_http::create_app(&self.data, true).wrap(NormalizePath)).await;
let req = test::TestRequest::get().uri(url).to_request();
let res = test::call_service(&mut app, req).await;
@ -175,7 +175,7 @@ impl Server {
eprintln!("post_request: {}", url);
let mut app =
test::init_service(meilisearch_http::create_app(&self.data).wrap(NormalizePath)).await;
test::init_service(meilisearch_http::create_app(&self.data, true).wrap(NormalizePath)).await;
let req = test::TestRequest::post()
.uri(url)
@ -204,7 +204,7 @@ impl Server {
eprintln!("put_request: {}", url);
let mut app =
test::init_service(meilisearch_http::create_app(&self.data).wrap(NormalizePath)).await;
test::init_service(meilisearch_http::create_app(&self.data, true).wrap(NormalizePath)).await;
let req = test::TestRequest::put()
.uri(url)
@ -233,7 +233,7 @@ impl Server {
eprintln!("delete_request: {}", url);
let mut app =
test::init_service(meilisearch_http::create_app(&self.data).wrap(NormalizePath)).await;
test::init_service(meilisearch_http::create_app(&self.data, true).wrap(NormalizePath)).await;
let req = test::TestRequest::delete().uri(url).to_request();
let res = test::call_service(&mut app, req).await;