Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Dockerfile
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COPY . .
RUN CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse cargo build --release --features=vendored-openssl


FROM alpine:latest
FROM alpine:3.18.3

LABEL org.opencontainers.image.description="Blazing fast and lightweight tile server with PostGIS, MBTiles, and PMTiles support"

Expand Down
6 changes: 4 additions & 2 deletions src/srv/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use actix_http::ContentEncoding;
use actix_web::dev::Server;
use actix_web::error::ErrorBadRequest;
use actix_web::http::header::{
AcceptEncoding, Encoding as HeaderEnc, HeaderValue, Preference, CACHE_CONTROL, CONTENT_ENCODING,
AcceptEncoding, Encoding as HeaderEnc, HeaderValue, Preference, ACCEPT, AUTHORIZATION,
CACHE_CONTROL, CONTENT_ENCODING,
};
use actix_web::http::Uri;
use actix_web::middleware::TrailingSlash;
Expand Down Expand Up @@ -475,7 +476,8 @@ pub fn new_server(config: SrvConfig, sources: Sources) -> crate::Result<(Server,

let cors_middleware = Cors::default()
.allow_any_origin()
.allowed_methods(vec!["GET"]);
.allowed_methods(vec!["GET"])
.allowed_headers(vec![AUTHORIZATION, ACCEPT]);

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