diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-27 16:55:06 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-27 16:57:23 +0100 |
commit | 450ad431801b5f2c716041920842a9851b9d133c (patch) | |
tree | 06ecb71df5b2b36e9e125b62a70c4ca5504c8137 /app/lib | |
parent | 9f57c7d4a681a6563be267f728dab3603f75fe79 (diff) |
Do not run FetchLinkCardService on local URLs, increase file size limit to 8MB,
fix ProcessFeedService pushing status into distribution if called a second time while the first is still running (i.e. when a PuSH comes after a Salmon slap), fix not running escape on spoiler text before emojify
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/tag_manager.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/lib/tag_manager.rb b/app/lib/tag_manager.rb index 4af433200..2508eea97 100644 --- a/app/lib/tag_manager.rb +++ b/app/lib/tag_manager.rb @@ -56,6 +56,12 @@ class TagManager domain.nil? || domain.gsub(/[\/]/, '').casecmp(Rails.configuration.x.local_domain).zero? end + def local_url?(url) + uri = Addressable::URI.parse(url) + domain = uri.host + (uri.port ? ":#{uri.port}" : '') + TagManager.instance.local_domain?(domain) + end + def uri_for(target) return target.uri if target.respond_to?(:local?) && !target.local? |