no_cache_control 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -5
- data/lib/no_cache_control/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 165366993f6be5fa82cb76cc282eb6d6b13de89c
|
4
|
+
data.tar.gz: e527f5f591093275d2f56e3d9126b7c8f0c1e3a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6dbe3aeddf4b4eee15621f039d86d248b33103cff1bc23f5e6f94d23aea7ac3c5b7403b6e5dd612479543fceca9252375aa972d03025f573a25da3d487a7fca
|
7
|
+
data.tar.gz: 8d27bb1091cf2db7d9a3d0c235aa0d86d481b7770ffaf5343faa106d69b555af67cbc55e517ce6f48ebfa4124ae155664d4f51762d9473a33795f74b2fe3f0a9
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@ bullet-proof, one concern is that Authenticated pages **should
|
|
5
5
|
not be browser cached**.
|
6
6
|
|
7
7
|
This is due to fact that even when user is logged out, someone
|
8
|
-
may sit at
|
8
|
+
may sit at users computer and click browser back button and see the
|
9
9
|
restricted data.
|
10
10
|
|
11
11
|
Gem will set these headers:
|
@@ -16,17 +16,17 @@ Pragma: no-cache
|
|
16
16
|
Expires: -1
|
17
17
|
```
|
18
18
|
|
19
|
-
If you are building next-gen Twitter app
|
19
|
+
If you are building next-gen Twitter app then this is a bad idea
|
20
20
|
because you want to cache as much as possible. But when you're
|
21
|
-
building comertial
|
22
|
-
|
21
|
+
building comertial dashboard, payment software, ... then you
|
22
|
+
should set those headers.
|
23
23
|
|
24
24
|
## Installation
|
25
25
|
|
26
26
|
Add this line to your application's Gemfile:
|
27
27
|
|
28
28
|
```ruby
|
29
|
-
gem 'no_cache_control'
|
29
|
+
gem 'no_cache_control'
|
30
30
|
```
|
31
31
|
|
32
32
|
And then execute:
|
@@ -39,6 +39,33 @@ Or install it yourself as:
|
|
39
39
|
|
40
40
|
## Usage
|
41
41
|
|
42
|
+
Gem will automaticly automatically append these headers to all your controllers, you don't need to do anything else.
|
43
|
+
|
44
|
+
|
45
|
+
## How to test if it works
|
46
|
+
|
47
|
+
No tests for this project as this is deep integration thing. (If anyone want to write a test
|
48
|
+
I'm more than happy to merge it in :blush: )
|
49
|
+
|
50
|
+
The only way how you can test it is to lunch your Rails server and:
|
51
|
+
|
52
|
+
* open browser, go to the website, and view page headers (like with
|
53
|
+
[web developer tools plugin](http://chrispederick.com/work/web-developer/); then
|
54
|
+
click in toolbar Information > View Response header)
|
55
|
+
* `curl http://0.0.0.0:3000/ -v`
|
56
|
+
|
57
|
+
## Tested Versions
|
58
|
+
|
59
|
+
Gem should work potentionally on any application that uses `ActionController`
|
60
|
+
(meaning all Rails versions) but we've tested only these:
|
61
|
+
|
62
|
+
* works on Rails 4.1.x
|
63
|
+
* works on Rails 3.2.x (only under Production env, more info [here](https://github.com/equivalent/no_cache_control/issues/1) and [here](http://stackoverflow.com/questions/26994714/how-to-force-cache-control-to-no-store-in-rails-3-2-20)
|
64
|
+
|
65
|
+
Please update this README file if you confirm any other
|
66
|
+
|
67
|
+
## Todo
|
68
|
+
|
42
69
|
* whitelisting of controllers that should be cached
|
43
70
|
|
44
71
|
## Contributing
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: no_cache_control
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Valent
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|