mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-31 15:31:53 +08:00
commit
c418abe92d
@ -9,3 +9,4 @@
|
|||||||
- Publish an ARMv7 and ARMv8 binaries on releases (#540 and #581)
|
- Publish an ARMv7 and ARMv8 binaries on releases (#540 and #581)
|
||||||
- Fixed a bug where the result of the update status after the first update was empty (#542)
|
- Fixed a bug where the result of the update status after the first update was empty (#542)
|
||||||
- Fixed a bug where stop words were not handled correctly (#594)
|
- Fixed a bug where stop words were not handled correctly (#594)
|
||||||
|
- Fix CORS issues (#602)
|
||||||
|
@ -4,7 +4,8 @@ use async_std::task;
|
|||||||
use log::info;
|
use log::info;
|
||||||
use main_error::MainError;
|
use main_error::MainError;
|
||||||
use structopt::StructOpt;
|
use structopt::StructOpt;
|
||||||
use tide::middleware::{Cors, RequestLogger};
|
use tide::middleware::{Cors, RequestLogger, Origin};
|
||||||
|
use http::header::HeaderValue;
|
||||||
|
|
||||||
use meilisearch_http::data::Data;
|
use meilisearch_http::data::Data;
|
||||||
use meilisearch_http::option::Opt;
|
use meilisearch_http::option::Opt;
|
||||||
@ -51,7 +52,10 @@ pub fn main() -> Result<(), MainError> {
|
|||||||
|
|
||||||
let mut app = tide::with_state(data);
|
let mut app = tide::with_state(data);
|
||||||
|
|
||||||
app.middleware(Cors::new());
|
app.middleware(Cors::new()
|
||||||
|
.allow_methods(HeaderValue::from_static("GET, POST, PUT, DELETE, OPTIONS"))
|
||||||
|
.allow_headers(HeaderValue::from_static("X-Meili-API-Key"))
|
||||||
|
.allow_origin(Origin::from("*")));
|
||||||
app.middleware(RequestLogger::new());
|
app.middleware(RequestLogger::new());
|
||||||
|
|
||||||
routes::load_routes(&mut app);
|
routes::load_routes(&mut app);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user