Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

Commit

Permalink
Merge pull request #30 from mozilla/connect-fonts
Browse files Browse the repository at this point in the history
Use connect-fonts instead of relying on Google.

@fmarier gave the r+, merging and pushing.
  • Loading branch information
Shane Tomlinson committed May 14, 2013
2 parents 6d6a72b + 51ca22e commit 8ebc13b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
14 changes: 12 additions & 2 deletions bin/eyedeeme
Expand Up @@ -11,7 +11,10 @@ cookieSessions = require("client-sessions"),
db = require('../lib/db.js'),
ejs = require('ejs'),
fs = require('fs'),
urlparse = require('urlparse');
urlparse = require('urlparse'),
connect_fonts = require('connect-fonts'),
font_pack_lora = require('connect-fonts-lora'),
font_pack_opensans = require('connect-fonts-opensans');

// the key with which session cookies are encrypted
const COOKIE_SECRET = process.env.SEKRET || 'super sekret sekret';
Expand Down Expand Up @@ -143,6 +146,13 @@ app.use(function(req, res, next) {

wsapi.register(app);

app.use(connect_fonts.setup({
fonts: [ font_pack_lora, font_pack_opensans ],
allow_origin: "https://eyedee.me",
ua: "all",
maxage: 180 * 24 * 60 * 60 * 1000 // 180 days
}));

// Tell express from where it should serve static resources
app.use(express.static(path.join(path.dirname(__dirname), "static")));

Expand All @@ -159,4 +169,4 @@ db.connect(function(err) {
localHostname = address.address + ':' + address.port
console.log("listening on " + localHostname);
});
});
});
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -9,7 +9,10 @@
"jwcrypto": "0.1.1",
"client-sessions": "0.1.1",
"bcrypt": "0.5.0",
"postprocess": "0.2.4"
"postprocess": "0.2.4",
"connect-fonts": "0.0.9-beta1",
"connect-fonts-opensans": "0.0.3-beta1",
"connect-fonts-lora": "0.0.2"
},
"devDependencies": {
"awsbox": "0.2.17"
Expand Down
3 changes: 1 addition & 2 deletions static/index.html
Expand Up @@ -4,8 +4,7 @@
<meta charset="utf-8">
<title>EyeDee.Me - Easy to use email aliases</title>
<meta name="viewport" content="initial-scale=1.0; maximum-scale=1.0; width=device-width;">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,800' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Lora' rel='stylesheet' type='text/css'>
<link href='/en/opensans-light,opensans-extrabold,lora-regular/fonts.css' type='text/css' rel='stylesheet'>
<link href='css/style.css' type='text/css' rel='stylesheet'>
</head>
<body>
Expand Down

0 comments on commit 8ebc13b

Please sign in to comment.