Add header, cf #34
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending

This commit is contained in:
Mylloon 2023-10-13 17:22:22 +02:00
parent 56661ec436
commit 991495893a
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -29,10 +29,14 @@ async fn main() -> Result<()> {
HttpServer::new(move || {
App::new()
.app_data(web::Data::new(config.to_owned()))
.wrap(DefaultHeaders::new().add((
"Onion-Location",
config.fc.onion.as_deref().unwrap_or_default(),
)))
.wrap(
DefaultHeaders::new()
.add((
"Onion-Location",
config.fc.onion.as_deref().unwrap_or_default(),
))
.add(("Permissions-Policy", "interest-cohort=()")),
)
.service(web::scope("/api").service(web::scope("v1").service(api_v1::love)))
.service(index::page)
.service(agreements::security)