Skip to content

Commit

Permalink
Revert "fix: Include Authorization and Accept in CORs allowed headers"
Browse files Browse the repository at this point in the history
This reverts commit ee395a4.
  • Loading branch information
jennaramdenee committed Nov 6, 2023
1 parent 5c990b0 commit 0871a2d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions martin/src/srv/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use actix_web::dev::Server;
use actix_web::error::{ErrorBadRequest, ErrorInternalServerError, ErrorNotFound};
use actix_web::http::header::{
AcceptEncoding, ContentType, Encoding as HeaderEnc, HeaderValue, Preference, CACHE_CONTROL,
CONTENT_ENCODING, AUTHORIZATION, ACCEPT
CONTENT_ENCODING,
};
use actix_web::http::Uri;
use actix_web::middleware::TrailingSlash;
Expand Down Expand Up @@ -481,8 +481,7 @@ pub fn new_server(config: SrvConfig, state: ServerState) -> crate::Result<(Serve
let server = HttpServer::new(move || {
let cors_middleware = Cors::default()
.allow_any_origin()
.allowed_methods(vec!["GET"])
.allowed_headers(vec![AUTHORIZATION, ACCEPT]);
.allowed_methods(vec!["GET"]);

App::new()
.app_data(Data::new(state.tiles.clone()))
Expand Down

0 comments on commit 0871a2d

Please sign in to comment.