diff options
author | Cheng-Han, Wu | 2016-02-16 19:54:29 -0800 |
---|---|---|
committer | Cheng-Han, Wu | 2016-02-16 19:54:29 -0800 |
commit | 3f2f063e9b6c6d36169f6acefc27df87d0bd176b (patch) | |
tree | bce4c058f16f9d3211965b92b5f794746444b0c8 /lib | |
parent | db86dc7a4880ea59b5647dad417fad6379e46b9a (diff) |
Fixed export gist title might null and fake referer that redirect to gist html_url
Diffstat (limited to 'lib')
-rw-r--r-- | lib/response.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/response.js b/lib/response.js index 07cb5ba9..41723b32 100644 --- a/lib/response.js +++ b/lib/response.js @@ -544,6 +544,7 @@ function githubActionGist(req, res, noteId) { var title = notedata.title; var decodedTitle = LZString.decompressFromBase64(title); if (decodedTitle) title = decodedTitle; + else title = 'Untitled'; var filename = title.replace('/', ' ') + '.md'; var gist = { "files": {} @@ -562,6 +563,7 @@ function githubActionGist(req, res, noteId) { json: gist }, function (error, httpResponse, body) { if (!error && httpResponse.statusCode == 201) { + res.setHeader('referer', ''); res.redirect(body.html_url); } else { return response.errorForbidden(res); |