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

rules matcher should use parsed url instead of descriptor path #24

Closed
celiolatorraca opened this issue Feb 15, 2016 · 1 comment
Closed
Labels

Comments

@celiolatorraca
Copy link

Rule matches should compare parsed url instead of descriptor path

Here is what i have to do right now:

var manifest = {
  host: 'http://api',
  resources: {
    List: {
      byId: '/{resource_list}/{resource_id}/'
    }
  },
  rules: [
    {
      match: /resource_list/,
      values: {
        gateway: {
          cache: { ttl: 60 * 30 }
        }
      }
    }
  ]
}

But i have 2 different resources list.
It should be awsome if we hame something like this:

Here is what i have to do right now:

var manifest = {
  host: 'http://api',
  resources: {
    List: {
      byId: '/{resource_list}/{resource_id}/'
    }
  },
  rules: [
    {
      match: /watch_history/,
      values: {
        gateway: {
          cache: { ttl: 60 * 30 }
        }
      }
    },
    {
      match: /favorites/,
      values: {
        gateway: {
          cache: { ttl: 60 * 120 }
        }
      }
    }
  ]
}
@tulios tulios added the Bug label Feb 15, 2016
@tulios
Copy link
Owner

tulios commented Feb 15, 2016

This is definitely wrong and should be fixed. Thanks!

@tulios tulios closed this as completed in 0e959dc Feb 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants