Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to disable blueprint in sails

Is it possible to disable blueprint on certain controllers in sails?

I've created a controller and I would like to make it only accessible using the custom route I provided in the routes.js but when I do like controller/action I can still see the page.

In the controller I defined _config: {blueprints: {action: false, rest: false, shortcuts: false }}

Thanks

like image 426
ginad Avatar asked Mar 05 '14 18:03

ginad


1 Answers

It looks like there's an error in the docs. You no longer need the interior blueprints object for your per-route controller config. So in your controller, just do:

_config: { actions: false, rest: false, shortcuts: false }

and it should work fine. Sorry about that!

-- Edit --

The above is valid for v0.10.x only. For v0.9.x, you'll still need to define your per-controller config using _config.blueprints.

like image 161
sgress454 Avatar answered Oct 19 '22 19:10

sgress454