Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for params to be scrubbed for SEO #31

Open
panthershark opened this issue Apr 23, 2014 · 0 comments
Open

Add option for params to be scrubbed for SEO #31

panthershark opened this issue Apr 23, 2014 · 0 comments

Comments

@panthershark
Copy link
Member

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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant