Dev.to Security 🔐 Cybersecurity 👁 0 📖 1 min read

Lock Down a Strapi API with Roles and API Tokens

Lock Down a Strapi API with Roles and API Tokens Go to Settings → API Tokens → Create new API Token. Choose Custom, and tick only find and findOne on the types you need. Send it from your server, never the browser:

Lock Down a Strapi API with Roles and API Tokens
Theodore Kelechukwu Onyejiaku
Theodore Kelechukwu Onyejiaku

Posted on Nov 13 • Originally published at mystite.com

Lock Down a Strapi API with Roles and API Tokens

Cover

Lock Down a Strapi API with Roles and API Tokens

  1. Go to Settings → API Tokens → Create new API Token.
  2. Choose Custom, and tick only find and findOne on the types you need.
  3. Send it from your server, never the browser:
curl -H "Authorization: Bearer $STRAPI_TOKEN" http://localhost:1337/api/recipes
Enter fullscreen mode Exit fullscreen mode
DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.