rack-noindex_https 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,16 +7,11 @@ module Rack
7
7
  end
8
8
 
9
9
  def call(env)
10
- dup._call(env)
11
- end
12
-
13
- def _call(env)
14
10
  puts "got here"
15
11
  @status, @headers, @body = @app.call(env)
16
12
  puts env.inspect
17
- request = Rack::Request.new(env)
18
13
 
19
- if request.scheme == 'https' && (@headers['Content-Type'] =~ /application\/html/ || @headers['Content-Type'] =~ /text\/html/)
14
+ if env['rack.url_scheme'] == 'https' && (@headers['Content-Type'] =~ /application\/html/ || @headers['Content-Type'] =~ /text\/html/)
20
15
  @body = @body.collect {|fragement| puts "updating"; fragement.gsub(%r{</head>}, '<meta name="robots" content="noindex"></head>') }
21
16
  end
22
17
 
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class NoindexHttps
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-noindex_https
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: