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

Cannot configure request path rewrite when creating a route using dashboard #1241

Closed
Caelebs opened this issue Jan 8, 2021 · 9 comments · Fixed by #1576
Closed

Cannot configure request path rewrite when creating a route using dashboard #1241

Caelebs opened this issue Jan 8, 2021 · 9 comments · Fixed by #1576
Assignees
Labels
enhancement New feature or request frontend good first issue Good for newcomers
Milestone

Comments

@Caelebs
Copy link

Caelebs commented Jan 8, 2021

Bug report

Describe the bug

In apisix-dashboard version 2.2, is there no input box configured to request rewriting on the page? I tried the proxy-rewrite plugin and it is still available. The function of request rewrite is normal, but the entry of configuration request rewrite is moved to the plugin configuration page. And this configuration page is a bit cumbersome? I need to edit the plugin information in json format, which is not very friendly.

Screenshots

image
image

System information

  • OS: [e.g. macOS, Windows] CentOS Linux release 7.6.1810 (Core)
  • Browser (if applies) [e.g. Chrome, Safari, Edge] Chrome/78.0.3904.108
  • Version: [e.g. 2.0-rc3] 2.2
@Caelebs Caelebs added the bug Something isn't working label Jan 8, 2021
@imjoey
Copy link
Member

imjoey commented Jan 8, 2021

+1 for me.

Hi @Caelebs , thanks for reporting and sorry for the inconvenience.

I'm afraid that the problem you mentioned above is just as expected. Since 2.2, the functionalities provided by plugins need to be configured at the plugin page via lines of JSON code. The proxy-rewrite plugin is one of them. 😄

@liuxiran
Copy link
Contributor

liuxiran commented Jan 8, 2021

We tried to use form to config the plugins according to its json schema before V2.2, but nnfortunately most of the plugins couldn't be built perfectly.

Refer to the issue #1039, we are still trying to find a way to use the form, which is more friendly to use.

Just feel free to talk about the way you are perfer to config the plugins, and welcome the technical solutions. Thanks a lot~

@juzhiyuan juzhiyuan added checking frontend and removed bug Something isn't working labels Jan 8, 2021
@juzhiyuan juzhiyuan added this to the 2.4 milestone Jan 8, 2021
@juzhiyuan juzhiyuan added enhancement New feature or request good first issue Good for newcomers and removed checking labels Jan 8, 2021
@juzhiyuan juzhiyuan removed this from the 2.4 milestone Jan 8, 2021
@Caelebs
Copy link
Author

Caelebs commented Jan 8, 2021

I understand, so the current version 2.2 routing configuration related page involves plugin related functions, basically moved to the plugin configuration page, the plugin is configured in json format, which has little effect on the configuration items and the plugins with small data volume. , But the function is a little more complicated, the plug-in with more configuration items, json is not very friendly, but it is acceptable.

However, some time ago I deployed three sets of code of version 2.2, which may involve the release version and the master branch code, both of which are version 2.2. However, the plugin configuration of two environments is json format, and the other environment is form configuration.

In addition, there are two environments that configure the plugin in json format. One of the environments will only display the default value "disable": false. I can't know what exactly the plugin needs to configure. I can only modify the configuration through the document and its examples. In another environment, when I click to enable the plugin, the plugin configuration item will be loaded by default. I only need to modify the value. If the way the form is configured causes most of the plugins couldn't be built perfectly, can only be configured with json, This method is more friendly. I will try the latest master branch code and confirm the current configuration method.

2021
2021
2021

Thanks Reply @imjoey @liuxiran

@liuxiran
Copy link
Contributor

Sourced from this discussion:#1276 (comment)

Since we have already filtered the redirect plugin from plugin page, how about filter proxy-rewrite plugin at the same time?
Just like v1.5, Integrated function of proxy rewrite into the process of creating a route.

For proxy-rewrite is a frequently used plugin, IMHO we could customize the use of this plugin.

what's your opinion?

cc @juzhiyuan @LiteSun @nic-chen @membphis

@juzhiyuan
Copy link
Member

It's ok to use this plugin outside PluginMarket, but be careful to make sure the final data is correct.

@liuxiran
Copy link
Contributor

It's ok to use this plugin outside PluginMarket, but be careful to make sure the final data is correct.

got it, and I have a few details to confirm:

  1. it seems that pluginmarket is a common component, no mather I create route service or the global rules, I will use the same page, so do I need to make a difference between create route and others, which means filter the proxy-rewrite only in create route step3
  2. when I filterd this plugin, and I config proxy-write and script at the same time, which is the higher priority, or do I need to omit plugins or script or it doesn't matter?

@juzhiyuan
Copy link
Member

  1. If @LiteSun's filter configuration could solve this issue, we may not need to do a lot of changes, if I get your point :)
  2. plugins and scrip must not exist at the same time.

@LiteSun
Copy link
Member

LiteSun commented Jan 16, 2021

You can filter specific plugins on specific pages, as shown below. @liuxiran

image

@juzhiyuan juzhiyuan added this to the 2.5 milestone Jan 17, 2021
@liuxiran
Copy link
Contributor

thanks for the instruction @LiteSun @juzhiyuan
pls assign to me if it has not been claimed yet ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants