# "strip\_path" is not work

**URL:** <https://discuss.konghq.com/t/strip-path-is-not-work/2667>\
**Category:** Questions\
**Created:** [January 22, 2019, 9:38am UTC](https://discuss.konghq.com/t/strip-path-is-not-work/2667 "2019-01-22T09:38:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShiningRush](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/shiningrush/32/719_2.png) [@ShiningRush](https://discuss.konghq.com/u/ShiningRush)\
**Post date:** [January 22, 2019, 9:38am UTC](https://discuss.konghq.com/t/strip-path-is-not-work/2667/1 "2019-01-22T09:38:05Z")

</div>

Hi,  
Now i am developing a plugin to change upstream url with regex,  
Then i found that after i set upstream url by " ngx.var.upstream\_uri" or " kong.service.request.set\_path", the new path will not be stripped by kong.

For example, if i have a route with path “/api/x-service” and checked “strip\_path”, and request path is “/api/x-service/g-test-route/products”, my plugin changed the upstream url to “/api/x-service/products”, then kong will not strip upstream url to “/products” but still access “/api/x-service/products”, why? I hope kong could strip it.

Any idea is appreciated.
