bookingsync-rack-p3p 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/bookingsync-rack-p3p.rb +28 -0
- metadata +71 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
# Shamelessly ripped from https://github.com/hoopla/rack-p3p
|
2
|
+
module BookingSync
|
3
|
+
module Rack
|
4
|
+
class P3p
|
5
|
+
# Personalized options made with http://p3pedit.com
|
6
|
+
POLICY = 'CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi OUR SAMi OTRo UNRo PUBi IND UNI STA"'.freeze
|
7
|
+
|
8
|
+
def initialize(app)
|
9
|
+
@app = app
|
10
|
+
end
|
11
|
+
|
12
|
+
def call(env)
|
13
|
+
response = @app.call(env)
|
14
|
+
insert_p3p(response)
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
def insert_p3p(response)
|
19
|
+
if response.first == 304
|
20
|
+
response[1].delete('Set-Cookie')
|
21
|
+
else
|
22
|
+
response[1].update('P3P' => POLICY)
|
23
|
+
end
|
24
|
+
response
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bookingsync-rack-p3p
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Robert Vogel
|
9
|
+
- Mat Schaffer
|
10
|
+
- Trotter Cashion
|
11
|
+
- Sebastien Grosjean
|
12
|
+
autorequire:
|
13
|
+
bindir: bin
|
14
|
+
cert_chain: []
|
15
|
+
date: 2013-11-30 00:00:00.000000000 Z
|
16
|
+
dependencies:
|
17
|
+
- !ruby/object:Gem::Dependency
|
18
|
+
name: rack
|
19
|
+
requirement: !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ! '>='
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 1.0.1
|
25
|
+
type: :runtime
|
26
|
+
prerelease: false
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.0.1
|
33
|
+
description: ! 'BookingSync-Rack-P3p is rack middleware for inserting P3P headers
|
34
|
+
into apps. This will
|
35
|
+
|
36
|
+
allow your application to serve cookies to IE when in an iframe. It will also
|
37
|
+
|
38
|
+
pull off the cookie on 304 responses, since IE does not like the cookie then.'
|
39
|
+
email: dev@bookingsync.com
|
40
|
+
executables: []
|
41
|
+
extensions: []
|
42
|
+
extra_rdoc_files: []
|
43
|
+
files:
|
44
|
+
- lib/bookingsync-rack-p3p.rb
|
45
|
+
homepage: https://github.com/BookingSync/bookingsync-rack-p3p
|
46
|
+
licenses: []
|
47
|
+
post_install_message:
|
48
|
+
rdoc_options: []
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ! '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
requirements: []
|
64
|
+
rubyforge_project:
|
65
|
+
rubygems_version: 1.8.23
|
66
|
+
signing_key:
|
67
|
+
specification_version: 3
|
68
|
+
summary: BookingSync-Rack-P3p will insert a P3P header into your app. This gem is
|
69
|
+
configured for BookingSync needs
|
70
|
+
test_files: []
|
71
|
+
has_rdoc:
|