title: How to remove trailing slash from url in nuxt.js?
body: <p>I am looking for a way to redirect all my URLs so that they all do not have a slash in the end. 
  I have tried with <a href="https://www.npmjs.com/package/@nuxtjs/redirect-module" rel="noreferrer">https://www.npmjs.com/package/@nuxtjs/redirect-module</a>, but it does not redirect correctly.</p>
  
  <pre><code>redirect: [
      {
        from: '\/$',
        to: (from, req) =&gt; req.url.replace(/\/$/, '')
      }
    ],
  </code></pre>
  
  <p>For example, to change such a url <a href="http://localhost:8080/item/test-slug/" rel="noreferrer">http://localhost:8080/item/test-slug/</a>
  This module redirects me to <a href="http://localhost:8080/item/test-slug/item/test-slug" rel="noreferrer">http://localhost:8080/item/test-slug/item/test-slug</a></p>
  
  <p>Any insight will be welcome. Thanks!</p>