경로 대소문자 구분 설정 방법
Express에서는 caseSensitive라는 옵션을 통해서 백엔드로 들어오는 경로의 대소문자 구분 여부를 설정할 수 있습니다.
const router = express.Router({caseSensitive: true});- 옵션
-
caseSensitive- Type:
Boolean - Default:
false - Enable case sensitivity. Disabled by default, treating
/Fooand/fooas the same.
- Type:
-
mergeParams- Type:
Boolean - Default:
false - Preserve the
req.paramsvalues from the parent router. If the parent and the child have conflicting param names, the child’s value takes precedence.
- Type:
-
strict- Type:
Boolean - Default:
false - Enable strict routing. Disabled by default,
/fooand/foo/are treated the same by the router.
- Type:
-