[Rails] local request
Hi everybody!
Does anyone know the best approach to create local-only path?
====code begin====
MyApp::Application.routes.draw do
match 'quicksearch' => 'application#quicksearch'
end
===code end===
I want the path '\quicksearch' to be exactly local (available from application itself only), any external requests must be ignored.
The first thing came into my mind is to create small request filter based on IP (?). Of course...
Filter can be route-level or middleware-level, but anywhere.. IP address as a base of distinction seems to me not so good.
Any opinions, folks?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home