openresty / openresty/lua-nginx-module
Custom 401 Response
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
What's I am expected was HTTP code was 401, response content is :
{
"code": "401",
"msg": "no priviledged",
"data": []
}
but when the HTTP code is 401, openresty generate a HTML page. how to disable it and customize it to json response.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Investigate how OpenResty and NGINX handle 401 error responses and identify the configuration or API needed for a JSON response; done means a 401 returns the specified JSON instead of a generated HTML page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100