Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add stackato-sso-workaround.rb
to switch Lobster font source to https when Stackato sso is enabled
  • Loading branch information
Billy Tat committed Jul 14, 2014
1 parent 6441b35 commit 3e183ad
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions stackato-sso-workaround.rb
@@ -0,0 +1,13 @@
require "json"

sso_enabled = JSON.parse(ENV["VCAP_APPLICATION"])["sso_enabled"]

file = "public/css/screen.css"

# when sso is enabled use https for loading font from
# http://fonts.googleapis.com/css?family=Lobster
if sso_enabled
text = File.read(file)
text.gsub!("http://", "https://")
File.open(file, "w") {|f| f.puts text}
end
3 changes: 3 additions & 0 deletions stackato.yml
Expand Up @@ -2,3 +2,6 @@ name: photobooth

framework:
type: perl

hooks:
pre-running: ruby stackato-sso-workaround.rb

0 comments on commit 3e183ad

Please sign in to comment.