mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
gracefully handle missing Auth header
This commit is contained in:
parent
ec56d5f684
commit
446f1c85c3
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ end
|
|||
$auth = Auth.new(File.expand_path('../auth.json', __FILE__))
|
||||
def authenticated?(auth)
|
||||
if $config[:auth]
|
||||
username, password = auth.split('|')
|
||||
username, password = auth.to_s.split('|')
|
||||
$auth.authenticated?(username, password)
|
||||
else
|
||||
true
|
||||
|
|
|
|||
Loading…
Reference in a new issue