Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101838209
iframe.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Feb 14, 06:05
Size
1 KB
Mime Type
text/html
Expires
Sun, Feb 16, 06:05 (1 d, 8 h)
Engine
blob
Format
Raw Data
Handle
24239713
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
iframe.js
View Options
// Generated by CoffeeScript 1.12.7
(function() {
var iframe_template, utils;
utils = require('./utils');
iframe_template = "<!DOCTYPE html>\n<html>\n<head>\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <script src=\"{{ sockjs_url }}\"></script>\n <script>\n document.domain = document.domain;\n SockJS.bootstrap_iframe();\n </script>\n</head>\n<body>\n <h2>Don't panic!</h2>\n <p>This is a SockJS hidden iframe. It's used for cross domain magic.</p>\n</body>\n</html>";
exports.app = {
iframe: function(req, res) {
var content, context, k, quoted_md5;
context = {
'{{ sockjs_url }}': this.options.sockjs_url
};
content = iframe_template;
for (k in context) {
content = content.replace(k, context[k]);
}
quoted_md5 = '"' + utils.md5_hex(content) + '"';
if ('if-none-match' in req.headers && req.headers['if-none-match'] === quoted_md5) {
res.statusCode = 304;
return '';
}
res.setHeader('Content-Type', 'text/html; charset=UTF-8');
res.setHeader('ETag', quoted_md5);
return content;
}
};
}).call(this);
Event Timeline
Log In to Comment