Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion config/src/main/resources/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
exclusionConfigFileList:
- openapi
- values
- status

decryptorClass: com.networknt.decrypt.AESDecryptor
# com.networknt.decrypt.ManualAESDecryptor
Expand Down
2 changes: 1 addition & 1 deletion status/src/main/java/com/networknt/status/Status.java
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public static void reload() {
* status before customizing it. There are several organizations that have their own customized
* wrapper to translate the status code to something else in order to hide the real error message
* for security reasons.
* @return
* @return a map of config entries
*/
public static Map<String, Object> getConfig() {
return config;
Expand Down
21 changes: 20 additions & 1 deletion status/src/main/resources/config/status.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
---
# To control show or hide message field in the following error. Some organizations do not want to expose
# the error message to allow the hackers to guess how the server is doing with invalid requests.
showMessage: ${status.showMessage:true}
# To control show or hide description field in the following error. Some organizations do not want to expose
# the error description to allow the hackers to guess how the server is doing with invalid requests.
showDescription: ${status.showDescription:true}
# To control show or hide metadata field in the error. Light-4j default status code does not have metadata
# defined as below. However, user defined error could have metadata that is a JSON object. If you do not want
# to expose the error metadata to allow the hackers to guess how the server is doing with invalid requests, you
# can turn it off with is flag. Here is an example of metadata in YAML format
# ERR10000:
# statusCode: 401
# code: ERR10000
# message: INVALID_AUTH_TOKEN
# description: Incorrect signature or malformed token in authorization header
# metadata:
# link: https://lightapi.net/error/ERR10000
showMetadata: ${status.showMetadata:true}

# The rest of the content is the built-in error code of light-4j platform.
SUC10200:
statusCode: 200
code: SUC10200
Expand Down