Add secure protocol to server string if it's missing

This commit is contained in:
Angelo Stavrow 2020-09-24 16:49:09 -04:00
parent 22bca3dbf4
commit f686b6fb76
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE
2 changed files with 6 additions and 2 deletions

View File

@ -52,6 +52,10 @@ struct AccountLoginView: View {
.padding()
} else {
Button(action: {
let secureProtocolPrefix = "https://"
if !server.hasPrefix(secureProtocolPrefix) {
server = secureProtocolPrefix + server
}
model.login(
to: URL(string: server)!,
as: username, password: password

View File

@ -7,12 +7,12 @@
<key>WriteFreely-MultiPlatform (iOS).xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
<key>WriteFreely-MultiPlatform (macOS).xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>