Skip to content

Commit

Permalink
Block link.tl from lobsters#714
Browse files Browse the repository at this point in the history
  • Loading branch information
pushcx committed Aug 14, 2019
1 parent 845bd7d commit 2b1bfa3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/models/story.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ class Story < ApplicationRecord

# link shortening and other ad tracking domains
TRACKING_DOMAINS = %w{ 1url.com 7.ly adf.ly al.ly bc.vc bit.do bit.ly bitly.com buzurl.com cur.lv
cutt.us db.tt db.tt doiop.com ey.io filoops.info goo.gl is.gd ity.im j.mp lnkd.in ow.ly ph.dog
po.st prettylinkpro.com q.gs qr.ae qr.net research.eligrey.com scrnch.me s.id sptfy.com t.co
tinyarrows.com tiny.cc tinyurl.com tny.im tr.im tweez.md twitthis.com u.bb u.to v.gd vzturl.com
wp.me ➡.ws ✩.ws x.co yep.it yourls.org zip.net }.freeze
cutt.us db.tt db.tt doiop.com ey.io filoops.info goo.gl is.gd ity.im j.mp link.tl lnkd.in ow.ly
ph.dog po.st prettylinkpro.com q.gs qr.ae qr.net research.eligrey.com scrnch.me s.id sptfy.com
t.co tinyarrows.com tiny.cc tinyurl.com tny.im tr.im tweez.md twitthis.com u.bb u.to v.gd
vzturl.com wp.me ➡.ws ✩.ws x.co yep.it yourls.org zip.net }.freeze

# URI.parse is not very lenient, so we can't use it
URL_RE = /\A(?<protocol>https?):\/\/(?<domain>([^\.\/]+\.)+[a-z]+)(?<port>:\d+)?(\/|\z)/i.freeze
Expand Down

0 comments on commit 2b1bfa3

Please sign in to comment.