mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +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__))
|
$auth = Auth.new(File.expand_path('../auth.json', __FILE__))
|
||||||
def authenticated?(auth)
|
def authenticated?(auth)
|
||||||
if $config[:auth]
|
if $config[:auth]
|
||||||
username, password = auth.split('|')
|
username, password = auth.to_s.split('|')
|
||||||
$auth.authenticated?(username, password)
|
$auth.authenticated?(username, password)
|
||||||
else
|
else
|
||||||
true
|
true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue