nuxt-community / redirect-module

No more cumbersome redirects for Nuxt 2!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for case insensitive pattern

japboy opened this issue · comments

It woulb be great if case insensitive redirect pattern is supported :D

I just tried to use a regex literal string in order to add a case insensitive flag and it works fine.

{from: /^\/case-insensitive-url/i, to: '/my/redirect', statusCode: 301},

image

This works because in the module it tries to create a regex from the string in the 'from' field. But if you already have a regex, the new RegExp() in the module code will just let it pass through untouched.