Sha256: 9537c589ffffdf82b6a560d9a3089ea535851873efa861f245475965ffafe540

Contents?: true

Size: 352 Bytes

Versions: 62

Compression:

Stored size: 352 Bytes

Contents

module Workarea
  module RoutesConstraints
    class RedirectConstraint
      def matches?(request)
        request.path != '/sitemap.xml'        || # ignore root sitemap
        request.path !~ /\A\/sitemaps\/.*\z/i || # ignore all sitemaps
        request.path !~ /\A.*\.(jpe?g|png|gif|swf|css|js|xml)\z/i # ignore assets
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.5.26 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.4.45 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.5.25 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.5.23 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.4.44 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.5.22 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.4.43 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.5.21 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.4.42 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.5.20 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.4.41 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.5.19 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.4.40 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.5.18 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.4.39 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.5.17 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.4.38 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.5.16 lib/workarea/routes_constraints/redirect.rb
workarea-core-3.4.37 lib/workarea/routes_constraints/redirect.rb