Skip to content

Commit

Permalink
Fixed issue - Request always directed to production endpoint when usi…
Browse files Browse the repository at this point in the history
…ng API Key Only.
  • Loading branch information
prasa7 committed Jan 31, 2023
1 parent 16a6024 commit 15a14d2
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ private void setApiVelocityContext(API api, VelocityContext context) {
} else {
context.put("apiIsOauthProtected", Boolean.FALSE);
}
//if API is secured with api_Key
if (apiSecurity != null && apiSecurity.contains(APIConstants.API_SECURITY_API_KEY)) {
context.put("apiIsApiKeyProtected", Boolean.TRUE);
} else {
context.put("apiIsApiKeyProtected", Boolean.FALSE);
}
//if API is secured with basic_auth
if (apiSecurity != null && apiSecurity.contains(APIConstants.API_SECURITY_BASIC_AUTH)) {
context.put("apiIsBasicAuthProtected", Boolean.TRUE);
} else {
context.put("apiIsBasicAuthProtected", Boolean.FALSE);
}
if (api.isEnabledSchemaValidation()) {
context.put("enableSchemaValidation", Boolean.TRUE);
} else {
Expand Down

0 comments on commit 15a14d2

Please sign in to comment.