Ignored headers are not being fetched correctly from configuration file
Closed this issue · 0 comments
The current implementation of the code to fetch the ignored headers from the configuration file has a typo, which is causing the wrong key to be used when fetching the value. As a result, the code always returns an empty array, even when the value is defined in the configuration file.
To fix this issue, we need to update the code to use the correct key when fetching the value from the configuration file.
Proposed solution:
Update the second line of the code to use the correct key ignored_headers
instead of ignore_headers
.
ignored_headers = if @macaw.config.dig("macaw", "cache", "ignored_headers")
@macaw.config["macaw"]["cache"]["ignored_headers"]
end || []
Also, the current implementation of the cache feature has a bug that is causing inconsistent behavior with query parameters. The issue is caused by a misspelled symbol, which is leading to different cache keys being generated for the same request with different query parameters.
To fix this issue, we need to update the code to use the correct symbol when generating the cache key for requests with query parameters.
Proposed solution:
Update the code to use the correct symbol params
instead of parameters
when generating the cache key for requests with query parameters.