prevent nil token
This commit is contained in:
@@ -27,3 +27,6 @@ MUX_TOKEN_ID=
|
||||
MUX_TOKEN_SECRET=
|
||||
MUX_BROADCAST_SERVER_URL=rtmp://global-live.mux.com:5222/app
|
||||
MUX_TEST_MODE_DISABLED=
|
||||
|
||||
# Required for
|
||||
CUSTOM_API_TOKEN=
|
||||
@@ -20,7 +20,7 @@ class Api::UsersController < Api::ApiController
|
||||
end
|
||||
|
||||
def verify_custom_token
|
||||
if token != ENV['CUSTOM_API_TOKEN']
|
||||
if token.nil? || token.empty? || token != ENV['CUSTOM_API_TOKEN']
|
||||
unauthorized_entity(:user)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user