Skip to content

Add option for params to be scrubbed for SEO #31

@panthershark

Description

@panthershark

Add ability to declare a variable as scrubbed using this lib - https://github.com/tommymessbauer/url-seo-scrubber.

In the example, the param title has the property seo:true so a title like dogs:cats? would be cleaned up and turned into the url /post/1234/dogs-cats

"post": {
  "method": "GET",
  "name": "post",
  "path": "/post/:title",
  "description": "Blog post",
  "handler": "blogpost",
  "params": {
    "id": {
      "kind": "rest",
      "regex": "(\\d+)",
      "default": "",
      "enabled": true
    },
    "title": {
      "kind": "rest",
      "regex": "(.*)",
      "default": "",
      "enabled": true,
      "seo": true
    }
  },
  "enabled": true
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions