Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
strapi-plugin-redirects
Advanced tools
This plugin allows a user to manage redirects from the admin panel.
Readme
This plugin provides a convenient way to manage URL redirects within a dedicated collection type in Strapi, catering to the headless nature of the CMS. While it does not automatically handle redirects on the server side, it offers a structured endpoint from which frontend applications can fetch redirect rules and implement redirection logic as needed. This approach empowers developers and content managers to seamlessly integrate and manage redirect rules, enhancing SEO and user experience by leveraging the flexibility of Strapi's headless architecture.
From
), the destination URL (To
), and the redirect type (Type
).api/redirects
endpoint as a JSON object. This endpoint is accessible to authenticated users with the appropriate permissions, enabling easy integration with your frontend.npm install strapi-plugin-redirects
or yarn add strapi-plugin-redirects
module.exports = ({ env }) => ({
// Other plugin configurations...
redirects: {
enabled: true,
},
});
Redirects
section within the plugins area.Add New Redirect
and fill in the To
, From
, and Type
fields accordingly.api/redirects
endpoint.api/redirects
. The response will be a JSON object listing all configured redirects.You can import redirects in bulk by uploading a CSV file with from
, to
, and type
headers. Both relative and absolute paths are supported for maximum flexibility, and specifying permanent
or temporary
in the type
field correctly maps to the respective redirect type.
This plugin is ideal for content editors or SEO specialists managing redirects in a headless CMS setup. Here's how you can integrate it with a Next.js project:
next.config.js
.Example script for fetching redirects:
const redirects = () => {
return fetch('http://localhost:1337/redirects')
.then(res => res.json())
.then(response => {
// Use redirects however you need to
});
};
module.exports = redirects;
Incorporate the fetched redirects into next.config.js:
const getRedirects = require('./redirects');
module.exports = {
// Other configurations...
redirects: () => getRedirects(),
};
Define your redirect types with clear descriptions, for instance:
This plugin is inspired by and extends the functionalities of the @webbio plugin by adding features like bulk import capabilities. Contributions in the form of translations, feature enhancements, and bug fixes are highly encouraged and appreciated.
We are particularly interested in expanding the plugin to include:
Feel free to reach out or submit pull requests on GitHub if you're interested in contributing to the development of this plugin.
This plugin is available under the MIT License. For more information, please refer to the LICENSE file in the repository.
FAQs
This plugin allows a user to manage redirects from the admin panel.
The npm package strapi-plugin-redirects receives a total of 481 weekly downloads. As such, strapi-plugin-redirects popularity was classified as not popular.
We found that strapi-plugin-redirects demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.