Skip to content

Return appropriate return codes based on responses #1

Description

@gudlyf

If, for example, galah is returning a redirect response, it should return the appropriate return code (bonus: make return codes other than 200 optional).

Current behavior:

curl -i http://localhost:8080/wp-admin/
HTTP/1.1 200 OK
Connection: keep-alive
Location: http://localhost:8080/wp-login.php?redirect_to=http%3A%2F%2Flocalhost%3A8080%2Fwp-admin%2F&reauth=1
Server: Apache/2.4.1 (Unix)
Date: Mon, 22 Jan 2024 16:51:24 GMT
Content-Length: 0

Changed behavior:

curl -i http://localhost:8080/wp-admin/
HTTP/1.1 302 Moved Temporarily
Connection: keep-alive
Location: http://localhost:8080/wp-login.php?redirect_to=http%3A%2F%2Flocalhost%3A8080%2Fwp-admin%2F&reauth=1
Server: Apache/2.4.1 (Unix)
Date: Mon, 22 Jan 2024 16:51:24 GMT
Content-Length: 0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions