check if req.query exist before getting req.query.api_key/map_key
This commit is contained in:
parent
fc420c2c0f
commit
3e916c6054
@ -34,11 +34,11 @@ function getApikeyTokenFromHeaderAuthorization(req) {
|
||||
}
|
||||
|
||||
function getApikeyTokenFromRequestQueryString(req) {
|
||||
if (req.query.api_key) {
|
||||
if (req.query && req.query.api_key) {
|
||||
return req.query.api_key;
|
||||
}
|
||||
|
||||
if (req.query.map_key) {
|
||||
if (req.query && req.query.map_key) {
|
||||
return req.query.map_key;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user