Skip to content

feat(admin): add head method support to /apisix/admin#8752

Merged
spacewander merged 3 commits into
apache:masterfrom
An-DJ:admin-api-head
Feb 15, 2023
Merged

feat(admin): add head method support to /apisix/admin#8752
spacewander merged 3 commits into
apache:masterfrom
An-DJ:admin-api-head

Conversation

@An-DJ

@An-DJ An-DJ commented Jan 31, 2023

Copy link
Copy Markdown
Contributor

Description

Fixes #8741

A demo:

# curl --head "http://localhost:9180/apisix/admin"

HTTP/1.1 200 OK
Date: Tue, 14 Feb 2023 12:35:19 GMT
Content-Type: application/json
Connection: keep-alive
Server: APISIX/3.1.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: *
Access-Control-Max-Age: 3600

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@spacewander spacewander left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. only implement a feature in Nginx conf if it's the only way
  2. we should put it under /apisix/admin, otherwise it will be broken if we share the same port between admin/node
  3. we don't need body if it is only used with HEAD
  4. new feature needs test

@An-DJ An-DJ changed the title feat(admin): add a welcome statement to admin api feat(admin): add head method support to /apisix/admin Feb 14, 2023
@An-DJ

An-DJ commented Feb 14, 2023

Copy link
Copy Markdown
Contributor Author

CC @juzhiyuan

@juzhiyuan juzhiyuan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, cc @spacewander

@spacewander
spacewander merged commit bf603ac into apache:master Feb 15, 2023
hongbinhsu added a commit to fitphp/apix that referenced this pull request Feb 23, 2023
* upstream/master:
  fix: limit count plugin conf parameter undefined error (apache#8902)
  chore: remove duplicate kubernetes test case (apache#8882)
  feat: add 'range_id' algorithm for 'request-id' plugin (apache#8790)
  chore(error-log-logger): add kafka meta_refresh_interval (apache#8821)
  chore(deps): bump golang.org/x/net from 0.2.0 to 0.7.0 in /t/grpc_server_example (apache#8881)
  docs: Update getting-started.md (apache#8763)
  fix(admin): fix wrong http code for patch method (apache#8855)
  feat: stream subsystem support tars service discovery (apache#8826)
  feat(ci): implement image caching to reduce ci build time. (apache#8735)
  feat(admin): add head method support to /apisix/admin (apache#8752)
  feat: opentelemetry plugin config collector.address support specify https scheme (apache#8823)
  fix: add admin schema to control_plane config (apache#8809)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: As a user, I want APISIX to support the head HTTP request, so that we can check if the APISIX is available easily

3 participants