1
0
Fork 0
forked from alemi/upub

fix: should be overkill but better safe??

This commit is contained in:
əlemi 2024-05-20 09:36:20 +02:00
parent 4290011ce3
commit 702248348c
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -13,7 +13,7 @@ pub async fn view(
) -> crate::Result<Response> { ) -> crate::Result<Response> {
if let Some(accept) = headers.get("Accept") { if let Some(accept) = headers.get("Accept") {
if let Ok(accept) = accept.to_str() { if let Ok(accept) = accept.to_str() {
if accept.contains("text/html") { if accept.contains("text/html") && !accept.contains("application/ld+json") {
return Ok(Redirect::to("/web").into_response()); return Ok(Redirect::to("/web").into_response());
} }
} }