Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: echo plugin can not set headers #792

Closed
1 of 5 tasks
idbeta opened this issue Nov 12, 2020 · 3 comments
Closed
1 of 5 tasks

bug: echo plugin can not set headers #792

idbeta opened this issue Nov 12, 2020 · 3 comments
Assignees
Labels
bug Something isn't working duplicate This issue or pull request already exists plugin

Comments

@idbeta
Copy link
Contributor

idbeta commented Nov 12, 2020

  • Why do you submit this issue?
  • Question or discussion
  • Bug
  • Requirements
  • Feature or performance improvement
  • Other

The headers option will automatically refresh as Opthion3 when setting the other option,
and the headers option can not be set.
image

@liuxiran
Copy link
Contributor

There are two errors here:

  1. headers schema should be transformed just like proxy-rewrite and response-rewrite in fe plugin component

  2. echo schema still uses Draft5, that why we will see select element Option1 in page. so It also needs to change the echo shema to Draft7.

{
    "additionalProperties": false,
    "required": ["before_body","body","after_body"],
    "minProperties": 1,
    "properties": {
	"after_body": {
		"description": "body after the modification of filter phase.",
			"type": "string"
		},
		"auth_value": {
			"description": "auth value",
			"type": "string"
		},
		"before_body": {
			"description": "body before the filter phase.",
			"type": "string"
		},
		"body": {
			"description": "body to replace upstream response.",
			"type": "string"
		},
		"headers": {
			"description": "new headers for response",
			"minProperties":1,
			"type": "object"
		}
	},
	"type": "object"
}

@liuxiran liuxiran added bug Something isn't working and removed checking labels Nov 12, 2020
@juzhiyuan juzhiyuan added the duplicate This issue or pull request already exists label Nov 24, 2020
@juzhiyuan juzhiyuan self-assigned this Nov 24, 2020
@nic-chen
Copy link
Member

fixed by code-mirror

@juzhiyuan
Copy link
Member

closed by #898

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists plugin
Projects
None yet
Development

No branches or pull requests

4 participants