Skip to content

licitdev/directus-extension-disable-listing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Directus Extension - Disable Listing

Disable listing of collections for public users. Listings for admins and users with app access to the Data Studio are always allowed.

NPM version License NPM downloads

Installation

npm install directus-extension-disable-listing

Options

Customize which routes to bypass the disabling

Add the EXT_DISABLE_LISTING_BYPASS_ROUTES environment variable with the route name separated by commas. For collections within the items route, prefix with items/.

Defaults to auth as it's required for the Data Studio to function.

Example: auth,items/articles,items/comments

Customize which HTTP method to bypass the disabling

Add the EXT_DISABLE_LISTING_BYPASS_METHODS environment variable with the HTTP method separated by commas.

Defaults to no method being bypassed.

Example: get,post

Customize whether authenticated users bypass the disabling

Add the EXT_DISABLE_LISTING_ALLOW_AUTHENTICATED environment variable with a boolean value.

Defaults to false.

Example: true

License

GPLv3 License. See the LICENSE file.