app,server: Implement selection of household
This commit is contained in:
parent
dd266dccfd
commit
1eb815ada9
8 changed files with 284 additions and 34 deletions
|
|
@ -5,7 +5,11 @@ use axum::{
|
|||
async_trait,
|
||||
extract::{FromRef, FromRequestParts, State},
|
||||
headers::{authorization::Bearer, Authorization},
|
||||
http::{header::CONTENT_TYPE, request::Parts, HeaderValue, Method, StatusCode},
|
||||
http::{
|
||||
header::{AUTHORIZATION, CONTENT_TYPE},
|
||||
request::Parts,
|
||||
HeaderValue, Method, StatusCode,
|
||||
},
|
||||
response::IntoResponse,
|
||||
routing::{get, post, put},
|
||||
Json, Router, TypedHeader,
|
||||
|
|
@ -141,7 +145,7 @@ pub(crate) fn router(api_allowed: Option<HeaderValue>) -> Router<AppState> {
|
|||
};
|
||||
|
||||
let cors_base = CorsLayer::new()
|
||||
.allow_headers([CONTENT_TYPE])
|
||||
.allow_headers([CONTENT_TYPE, AUTHORIZATION])
|
||||
.allow_origin(origin);
|
||||
|
||||
let mk_service = |m: Vec<Method>| cors_base.clone().allow_methods(m);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue