mirror of
https://github.com/clowzed/sero
synced 2024-06-19 23:05:01 +02:00
Changed cors layer location
This commit is contained in:
parent
2ba76400c4
commit
246730d5c6
|
@ -62,7 +62,8 @@ async fn main() {
|
|||
|
||||
let cloned_state = state.clone();
|
||||
|
||||
let files_router = Router::new()
|
||||
let mut app = Router::new()
|
||||
.nest("/api", api_router)
|
||||
.route("/*path", get(handlers::sites::file))
|
||||
.route("/", get(handlers::sites::index_redirect))
|
||||
.layer(
|
||||
|
@ -104,11 +105,7 @@ async fn main() {
|
|||
|
||||
rx.recv().unwrap_or(false)
|
||||
})),
|
||||
);
|
||||
|
||||
let mut app = Router::new()
|
||||
.nest("/api", api_router)
|
||||
.nest("/", files_router)
|
||||
)
|
||||
.with_state(state.clone());
|
||||
|
||||
if config.max_body_limit_size.is_some() {
|
||||
|
|
Loading…
Reference in a new issue