Directus Extension Tokenized Preview

screenshot of Directus Extension Tokenized Preview
directus

An endpoint that adds an active auth token to your preview URL

Overview

The Tokenized Preview Endpoint for Directus is an innovative solution that enhances the way developers and content creators can preview content that is otherwise restricted from public access. By incorporating an active authentication token with a limited Time-To-Live (TTL) into the preview URL, this feature allows users to seamlessly access private content directly through the API. This capability is particularly useful for testing and reviewing changes before they go live, ensuring a smooth workflow and improved collaboration among teams.

Integrating this endpoint into your Directus setup is straightforward. By following the official guide and utilizing the NPM package, developers can easily prefix their preview URLs, providing an intuitive experience when working with content models. The result is a flexible and secure way to manage content previews, making it an essential tool for any Directus user looking to streamline their content management process.

Features

  • Active Auth Token: Integrates an authentication token that ensures secure access to preview content not available publicly.

  • Limited TTL: The token has a limited Time-To-Live, enhancing security by restricting how long the preview URL remains valid.

  • Easy Configuration: Configure the endpoint via environment variables, allowing for customizable settings according to your project needs.

  • Flexible URL Prefix: Users can prefix preview URLs with /preview/ to easily format the URL or set a base URL for streamlined access.

  • Enhanced Security Compliance: Requires the setting of CONTENT_SECURITY_POLICY_DIRECTIVES__FRAME_SRC for both main and preview base URLs, promoting secure handling of content.

  • Official Documentation: Comprehensive guide and NPM package support provided, allowing for quick installation and implementation.

  • User-Friendly Integration: Designed for ease of use, making it accessible for both developers and content creators without extensive technical knowledge.

directus
Directus

A website that uses Directus as an open source headless CMS to manage content. This includes features such as a customizable content model, role-based access control, and API-based content delivery to support a wide range of digital experiences.

Recoil

Recoil is a state management library for React that provides an intuitive and flexible API for managing and sharing state across components. It supports a range of features, including derived state, asynchronous updates, and time-travel debugging, and is designed to work well with the React ecosystem and other state management solutions.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.