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

Conditionally disable listener or change guessers #107

Open
jaymecd opened this issue May 1, 2014 · 0 comments
Open

Conditionally disable listener or change guessers #107

jaymecd opened this issue May 1, 2014 · 0 comments

Comments

@jaymecd
Copy link

jaymecd commented May 1, 2014

I've noticed one limitation during developing REST API for the project.
Default configuration is:

lunetics_locale:
    strict_mode: true
    allowed_locales: %conf_locale_available%
    guessing_order:
        - router
        - cookie
        - browser
    cookie:
        set_on_change: true

For the website it completely fine, great job.
But for stateless API I see 2 issues:

  1. it tries to detect locale which potentially could lead to unexpected behaviour with locale dependent output
  2. sets client cookie with detected locale

Most preferable way would be to conditionally disable listener for specific routes or so, and use guesser manually, eg QueryLocaleGuesser, to fetch locale regarding to API specs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant