ginad
ginad

Reputation: 1973

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

Upvotes: 7

Views: 2666

Answers (1)

sgress454
sgress454

Reputation: 24948

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.

Upvotes: 8

Related Questions