mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Rewrite server URL string if logging into Write.as
This commit is contained in:
parent
461f9cca40
commit
c00b71cd43
@ -58,6 +58,13 @@ struct AccountLoginView: View {
|
||||
#if os(iOS)
|
||||
hideKeyboard()
|
||||
#endif
|
||||
// If logging in to Write.as, trim any path in the hostname.
|
||||
if server.hasPrefix("https://write.as") ||
|
||||
server.hasPrefix("http://write.as") ||
|
||||
server.hasPrefix("write.as") {
|
||||
server = "https://write.as"
|
||||
}
|
||||
// Trim any trailing slashes that would cause the request to fail.
|
||||
if server.hasSuffix("/") {
|
||||
server = String(server.dropLast(1))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user