Merge pull request #39 from Bortseb/patch-2

Update social.coffee
This commit is contained in:
Paul Rodwell 2023-10-08 18:26:11 +01:00 committed by GitHub
commit b3ffdd0890
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -408,7 +408,7 @@ module.exports = exports = (log, loga, argv) ->
res.header 'Access-Control-Allow-Origin', req.get('Origin')||'*'
res.header 'Access-Control-Allow-Credentials', 'true'
# protect unclaimed by adding "add owner isnt ''" - maybe via parameter
return next() if (isAuthorized(req) and owner !== '') or allowedToView(req)
return next() if (isAuthorized(req) and (owner isnt '')) or allowedToView(req)
return res.redirect("/view/#{m[1]}") if m = req.url.match /\/(.*)\.html/
return res.json(['Login Required']) if req.url == '/system/sitemap.json'