You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apisix.apache.org by Ostap Kryvytskyy <os...@globallogic.com.INVALID> on 2024/03/11 12:39:26 UTC
Configure the user logout JSON response
Colleagues, good morning! As an engineer, I want to change the APISIX
response for the unauthorized scenario, so that internal protocol in
between different apps communication in the cluster is respected.
For example
<html>
<head><title>401 Authorization Required</title></head>
<body>
<center><h1> 401 Authorization Required</h1></center>
<hr><center>openresty</center>
<p><em>Powered by <a href="https://apisix.apache.org/
">APISIX</a>.</em></p></body>
</html>
Needs to be looking like this:
{ "errors": [ { "status": 401, "code": "UNAUTHORIZED_USER", "title": "Invalid
token provided. User is unauthorized", "developer_message": "Invalid token
provided. User is unauthorized", "links": [ { "rel": "about", "href": "
https://genai.support.com&code=UNAUTHORIZED_USER" } ] } ] }
I need your advice, colleagues: how this can be achieved better?
Thank you for letting me know! )