diff --git a/AgileWorks/AgileWorks/WebView/View/WebViewController.swift b/AgileWorks/AgileWorks/WebView/View/WebViewController.swift index 3299374b5048be8b7051e5d6dde80a48055084fc..f5f1203f0124c8122b56cadc698d6468f8f4c6ea 100644 --- a/AgileWorks/AgileWorks/WebView/View/WebViewController.swift +++ b/AgileWorks/AgileWorks/WebView/View/WebViewController.swift @@ -49,7 +49,7 @@ class WebViewController: UIViewController { "Mobile#agileWorksSearch": getDisplayString(key: "SearchTitle", comment: "") ] // 書類表示時 URL - let docUrl: [String] = ["Mobile#docDetail"] + let docUrl: [String] = ["Mobile#docDetail", "#docDetail"] override func viewDidLoad() { super.viewDidLoad() @@ -160,7 +160,7 @@ class WebViewController: UIViewController { DispatchQueue.main.async { let cookie = HTTPCookie(properties: [ HTTPCookiePropertyKey.domain: KeychainDataStore().readServerURL() ?? "", - HTTPCookiePropertyKey.path: "/AgileWorks", + HTTPCookiePropertyKey.path: "/" + Configuration.shared.awContextPath, HTTPCookiePropertyKey.secure: true, HTTPCookiePropertyKey.name: "JSESSIONID", HTTPCookiePropertyKey.value: KeychainDataStore().readSessionID()! @@ -561,7 +561,7 @@ extension WebViewController: WKNavigationDelegate { let formHost = KeychainDataStore().readServerURL()! // WebView と同じセッションでダウンロードできるように Cookie 設定。 // 他サイトへのアクセス時に Cookie を漏らさないよう、ホスト名とパスを確認しておく。 - if (url.host == formHost) && url.path.starts(with: "/AgileWorks/Broker/") { + if (url.host == formHost) && url.path.starts(with: "/" + Configuration.shared.awContextPath + "/Broker/") { request.setValue("JSESSIONID=\(KeychainDataStore().readSessionID()!)", forHTTPHeaderField: "Cookie") } return request