mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Bug fixes, undefined should not be a string
This commit is contained in:
parent
d4c1babe3c
commit
db362b30cd
2 changed files with 2 additions and 2 deletions
|
@ -256,7 +256,7 @@
|
|||
$(e.currentTarget).attr('target', '_blank');
|
||||
});
|
||||
|
||||
if (this.model !== 'undefined') {
|
||||
if (this.model !== undefined) {
|
||||
this.addSubview(new Ghost.View.PostSettings({el: $('.post-controls'), model: this.model})).render();
|
||||
}
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ function redirectToSignup(req, res, next) {
|
|||
function redirectSSL(req, res, next) {
|
||||
// Check if X-Forarded-Proto headers are sent, if they are check for https. If they are not assume true to avoid infinite redirect loop.
|
||||
// If the X-Forwarded-Proto header is missing and Express cannot automatically sense HTTPS the redirect will not be made.
|
||||
var httpsHeader = req.header('X-Forwarded-Proto') !== 'undefined' ? req.header('X-Forwarded-Proto').toLowerCase() === 'https' ? true : false : true;
|
||||
var httpsHeader = req.header('X-Forwarded-Proto') !== undefined ? req.header('X-Forwarded-Proto').toLowerCase() === 'https' ? true : false : true;
|
||||
if (!req.secure && !httpsHeader) {
|
||||
return res.redirect(301, url.format({
|
||||
protocol: 'https:',
|
||||
|
|
Loading…
Add table
Reference in a new issue