Skip to content

bug:  #4717

@azura27

Description

@azura27

Issue description

Environment

Bug report without environment information will be ignored or closed.

  • apisix version (cmd: apisix version):2.0
  • OS (cmd: uname -a): centos 7.4
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V): 1.17.8.2
  • 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.5
  • apisix-dashboard version, if have:
  • luarocks version, if the issue is about installation (cmd: luarocks --version):

Minimal test code / Steps to reproduce the issue

Bug report without steps to reproduce will be ignored or closed.

  1. set a route with cors open, OPTIONS method support
    2.visit route with OPTIONS method, return response with no allow-control-allow-origin etc. headers

What's the actual result? (including assertion message & call stack if applicable)

response with no allow-control-allow-origin etc. headers

What's the expected result?

response with allow-control-allow-origin etc. headers

For split backend and frontend environment OPTIONS method is used frequently, so return in rewrite stage is not suitable

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