fix_microsoft_links 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fix_microsoft_links.rb +1 -1
- metadata +2 -2
data/lib/fix_microsoft_links.rb
CHANGED
@@ -8,7 +8,7 @@ module FixMicrosoftLinks
|
|
8
8
|
def call(env)
|
9
9
|
# Clicking a URL from Microsoft apps will redirect you to login to already authenticated sites otherwise :(
|
10
10
|
# http://support.microsoft.com/kb/899927
|
11
|
-
if env["HTTP_USER_AGENT"] =~ /[^\w](Word|Excel|PowerPoint|
|
11
|
+
if env["HTTP_USER_AGENT"] =~ /[^\w](Word|Excel|PowerPoint|ms-office)([^\w]|\z)/
|
12
12
|
body = StringIO.new("<html><head><meta http-equiv='refresh' content='0'/></head><body></body></html>")
|
13
13
|
return [200, {"Content-Type" => "text/html"}, body]
|
14
14
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fix_microsoft_links
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-05-
|
13
|
+
date: 2012-05-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|