expand CORS route matching

This commit is contained in:
Lee Lawlor 2014-06-19 14:17:22 -04:00
parent 7e17e85edb
commit d1b5162154

View File

@ -210,9 +210,9 @@ Thingspeak::Application.routes.draw do
# streaming routes # streaming routes
match '/stream/channels/:id/feeds(.:format)', to: 'stream#channel_feed', :via => [:get, :post] match '/stream/channels/:id/feeds(.:format)', to: 'stream#channel_feed', :via => [:get, :post]
# add support for CORS preflighting (matches any OPTIONS route up to 4 levels deep) # add support for CORS preflighting (matches any OPTIONS route up to 5 levels deep)
# examples: /talkbacks, /talkbacks/4, /talkbacks/4/commands, /talkbacks/4/commands/6 # examples: /talkbacks, /talkbacks/4, /talkbacks/4/commands, /talkbacks/4/commands/6, /apps/thingtweet/1/statuses/update
match '/:foo(/:foo(/:foo)(/:foo))', :to => 'cors#preflight', :via => 'options' match '/:foo(/:foo(/:foo(/:foo(/:foo))))', :to => 'cors#preflight', :via => 'options'
#match ':controller(/:action(/:id(.:format)))', :via => :all #match ':controller(/:action(/:id(.:format)))', :via => :all
end end