Skip to content

request help: Why ip-restriction return json instead of default 403 error page #3528

Description

@nanamikon

Issue description

ip-restriction will return json when the remote ip matches blacklist

{"message":"Your IP address is not allowed"}

I think default 403 error page will be better, or supporting an option to change this behavior is ok

Environment

  • apisix version (cmd: apisix version): 2.2
  • OS (cmd: uname -a): ubuntu
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V): 1.19
  • etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API): 3.4.13
  • apisix-dashboard version, if have:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions