From f98d7915c599580a39c4aa77e9b491a16af79e3c Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Wed, 24 Mar 2021 21:55:06 +0800 Subject: [PATCH] fix: download current page not working on mobile --- komga-webui/src/views/BookReader.vue | 1 + .../komga/infrastructure/security/SecurityConfiguration.kt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/komga-webui/src/views/BookReader.vue b/komga-webui/src/views/BookReader.vue index ac7d77cc..6a18d95c 100644 --- a/komga-webui/src/views/BookReader.vue +++ b/komga-webui/src/views/BookReader.vue @@ -803,6 +803,7 @@ export default Vue.extend({ new jsFileDownloader({ url: this.currentPage.url, withCredentials: true, + forceDesktopMode: true, }) }, }, diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/security/SecurityConfiguration.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/security/SecurityConfiguration.kt index dc136a71..7bf476e0 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/security/SecurityConfiguration.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/security/SecurityConfiguration.kt @@ -7,6 +7,7 @@ import org.gotson.komga.infrastructure.configuration.KomgaProperties import org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Profile +import org.springframework.http.HttpHeaders import org.springframework.http.HttpMethod import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity import org.springframework.security.config.annotation.web.builders.HttpSecurity @@ -102,6 +103,7 @@ class SecurityConfiguration( allowedOrigins = listOf("http://localhost:8081") allowedMethods = HttpMethod.values().map { it.name } allowCredentials = true + addExposedHeader(HttpHeaders.CONTENT_DISPOSITION) } ) }