Added route wants me to authenticate?

I added a route through a plugin in my plugin.rb

post “/generate” => “discoursegen#generate”

which is running fine however when I do an ajax call on it the route wants me to use an api key? How can I set the route to be open access without auth?

Thanks,
Aedan.

skip_before_filter :ensure_logged_in in the controller should do it, assuming you want all endpoints of that controller to be unauth’d.

4 Likes

That sorted it out. Cheers.

3 Likes