meteor-ad-sso
meteor-ad-sso copied to clipboard
IE11 prompts user to download done.json
Lines 25-29 in iisnode-meteor-ad-sso/index.js
Current:
app.get("/" + config.basePath + "/done", function (req, res) {
res.writeHead(200, { 'Content-Type' : 'application/json' });
res.end('[]');
if (config.debug) console.error('Completed authentication');
});
When I browse to my Meteor app in IE11 I am prompted to download done.json.
When I make the following change...
app.get("/" + config.basePath + "/done", function (req, res) {
//res.writeHead(200, { 'Content-Type' : 'application/json' });
//res.end('[]');
res.writeHead(200);
res.end();
if (config.debug) console.error('Completed authentication');
});
everything works fine in all browsers I've tested (Chrome, FF, IE11) and IE no longer prompts for download.
I see you made a change to this file back in February stating that you wanted to return valid JSON, so maybe this issue is incorrect or misguided.
Would it be possible to try a fresh Windows install and look around if there's some sort of IE zone setting that's weird? Your fix above (while it shouldn't really a problem) kind of rubs me the wrong way. If I correctly set the MIME-type, why it would prompt to save the JSON is pretty idiotic. I tried to do a little testing here, but IE11 reported JSON
as undefined, despite a correctly set html5 doctype.
Anyway, ranting aside, if this isn't an isolated incident, we can fix it as above, but in theory it should work as it is.
I'll see what I can do with testing on a fresh install and I'll double check my security settings.
It does seem idiotic that IE prompts while all other browsers I've tested handle the original code just fine. However, it is IE so...
On a more positive note, I wanted to say thank you for creating and sharing this utility. It has been extremely helpful and very easy to implement and use.