Update URL

This commit is contained in:
Justin Mazzocchi 2020-09-12 02:22:29 -07:00
parent 9c77f55ec9
commit b0b713bd53
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C

View file

@ -74,7 +74,7 @@ private struct UpdatedFilterTarget: DecodableTarget {
typealias ResultType = BloomFilter<String>
let baseURL = URL(string: "https://filter.metabolist.com")!
let pathComponents = ["filter.json"]
let pathComponents = ["filter"]
let method = HTTPMethod.get
let encoding: ParameterEncoding = JSONEncoding.default
let parameters: [String: Any]? = nil
@ -84,7 +84,6 @@ private struct UpdatedFilterTarget: DecodableTarget {
private extension InstanceURLService {
static let httpsPrefix = "https://"
static let shortestPossibleURLLength = 4
// Ugly, but baking this into the compiled app instead of loading the data from the bundle is more secure
// swiftlint:disable line_length
static let defaultFilterData = #"{"hashes":["djb232","djb2a32","fnv132","fnv1a32","sdbm32"],"data":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAIAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAgAAAAAQAAAAAABAAACAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAABAAAEAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAIAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAA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