> my idea is there should be a field that is configable in config.yaml that
> determines whether or not to remove the last "/"

that is the way I would like. ^_^


On Mon, Jun 22, 2020 at 6:47 PM Li Ling(Lien) <lil...@apache.org> wrote:

> This has happened to me before,
>  and I solved it by adding a severless lua function.
> my idea is there should be a field that is configable in config.yaml that
> determines whether or not to remove the last "/"
>
> YuanSheng Wang <membp...@apache.org> 于2020年6月22日周一 下午4:42写道:
>
> > Hi:
> >
> > URI 1: http://xxxx:port/foo/bar/
> > URI 2: http://xxxx:port/foo/bar
> >
> > The difference between these two URIs is whether they include "/" at the
> > end.
> > For API providers, they often represent a URI resource.
> >
> > How about adding a global option: before starting to match a route,
> delete
> > the "/" character at the end of the URI.
> >
> > For example, URI 1 will be modified to http://xxxx:port/foo/bar after
> > deleting.
> >
> > In other words, when this option is turned on, URI 1 and URI 2 are the
> > same.
> >
> > --
> >
> > *MembPhis*
> > My GitHub: https://github.com/membphis
> > Apache APISIX: https://github.com/apache/incubator-apisix
> >
>


-- 

*MembPhis*
My GitHub: https://github.com/membphis
Apache APISIX: https://github.com/apache/incubator-apisix

Reply via email to