Code Monkey home page Code Monkey logo

geo_redirect's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

geo_redirect's Issues

Allow customizing 'redirect=1' feature

The option to allow a 'force' flag which overrides the geo-location mechanism is pretty much hard-coded into the lib.

  • Allow turning the feature off.
  • Allow customizing the GET var name (instead of the redirect=1 default).

City, State

Is just Countries? or can redirect to city state?

Remove Rails dependency

lib/tasks/geo_redirect.rb:16 uses the Rails constant.
Obviously there is no need for this.

Add configuration option to set the preference in cookies instead of session

It would be nice if we could have a config option to choose to store the values in cookies instead of the session.
One reason is that if Devise deletes the session after logout we would lose the preference.
The other reason is that we would want to simply remember the preference across different sessions (useful in some scenarios).
I will provide a PR.

Add debug option

Add an option to specify a log file and use it to throw messages throughout the process.

Avoid to redirect some routes

Is there a way to redirect all the traffic from a location, but not for the entire domain? So for example, i could redirect domain.com traffic except domain.com/pro traffic?

Get rid of ActiveSupport dependancy

Stop using object.present? in order to avoid the ActiveSupport dependancy.

Appearances:

  • lib/geo_redirect.rb:62
  • lib/geo_redirect.rb:68
  • lib/geo_redirect.rb:119

Convert always to symbol what we store in the session cookie

I think from Rails 4, when you retrieve a cookie, the value is a string.
IMHO it's better to always convert the value to symbol and to change the current test, to test also a string (I think it's not good to have the :default value, because we cannot store this value in the cookie).
I will provide a PR.

I'm running Rails 4.2.5

Enhancement google bot

Hi, great plugin!

What do you think adding more options for search engine crawlers?

For example skipping redirect for bots. Or skipping redirect for certain user agents.
thank you

Add generator for config yml template

Would be cool to have a generator that would just create some template yml file under config/geo_redirect.yml.
Perhaps even our example file, with some comments and explanations.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.