0
0
Fork 0

Strip protocol from attribution domains (#31900)

This commit is contained in:
David Roetzel 2024-09-13 13:37:15 +02:00 committed by GitHub
parent ba81e4e019
commit c1b2c4fd9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 33 additions and 1 deletions

View file

@ -13,7 +13,11 @@ module Account::AttributionDomains
def attribution_domains_as_text=(str)
self[:attribution_domains] = str.split.filter_map do |line|
line.strip.delete_prefix('*.')
line
.strip
.delete_prefix('http://')
.delete_prefix('https://')
.delete_prefix('*.')
end
end