{"_id":"@drozd-red/strapi-v5-redirects","_rev":"4-c83ae9c74f9af2b3d95e0aa36d072703","name":"@drozd-red/strapi-v5-redirects","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.4":{"name":"@drozd-red/strapi-v5-redirects","version":"1.0.4","keywords":[],"author":"","license":"MIT","_id":"@drozd-red/strapi-v5-redirects@1.0.4","maintainers":[{"name":"anna_andreeva","email":"andreeva.anna2909@gmail.com"}],"dist":{"shasum":"db2b3283373678a6f9ffd64e3b0d0476d8dd850e","tarball":"https://registry.npmjs.org/@drozd-red/strapi-v5-redirects/-/strapi-v5-redirects-1.0.4.tgz","fileCount":14,"integrity":"sha512-dEqBUYHnarJI6T6jCNwqKbB4AX7x+xlBAoVg/h4c9+yZ/TgtgzkHpSOOIo2sMb2Dwij7OqPUHJytFMstOTXv7A==","signatures":[{"sig":"MEUCICnriknyt9042M1LxiPRf4HzSHN0KloO2RXR1aCwQ0G9AiEAsErb2gHzIZoKwqrt5yVHheXY+kIbB9ifD80lsrKg/SQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":154477},"main":"dist/server/index.js","type":"commonjs","strapi":{"kind":"plugin","name":"redirects","description":"This plugin allows a user to manage redirects from the admin panel.","displayName":"Redirects"},"exports":{"./package.json":"./package.json","./strapi-admin":{"types":"./dist/admin/src/index.d.ts","import":"./dist/admin/index.mjs","source":"./admin/src/index.ts","default":"./dist/admin/index.js","require":"./dist/admin/index.js"},"./strapi-server":{"types":"./dist/server/src/index.d.ts","import":"./dist/server/index.mjs","source":"./server/src/index.ts","default":"./dist/server/index.js","require":"./dist/server/index.js"}},"scripts":{"build":"strapi-plugin build","watch":"strapi-plugin watch","verify":"strapi-plugin verify","watch:link":"strapi-plugin watch:link","test:ts:back":"run -T tsc -p server/tsconfig.json","test:ts:front":"run -T tsc -p admin/tsconfig.json"},"_npmUser":{"name":"anna_andreeva","email":"andreeva.anna2909@gmail.com"},"_npmVersion":"10.8.2","description":"This plugin allows a user to manage redirects from the admin panel.","directories":{},"_nodeVersion":"20.18.1","dependencies":{"qs":"^6.14.0","yup":"^1.7.1","csvtojson":"^2.0.10","react-intl":"^6.7.2","use-debounce":"^10.0.3","@strapi/icons":"^2.0.0-rc.11","@strapi/utils":"^5.0.6","@strapi/design-system":"^2.0.0-rc.11"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.1","prettier":"^3.3.3","@types/qs":"^6.15.0","react-dom":"^18.3.1","typescript":"^5.6.3","@types/react":"^18.3.11","@strapi/strapi":"^5.0.6","@types/react-dom":"^18.3.0","react-router-dom":"^6.26.2","styled-components":"^6.1.13","@strapi/sdk-plugin":"^5.2.6","@strapi/typescript-utils":"^5.0.6"},"peerDependencies":{"react":"^18.3.1","react-dom":"^18.3.1","@strapi/strapi":"^5.0.6","react-router-dom":"^6.26.2","styled-components":"^6.1.13","@strapi/sdk-plugin":"^5.2.6"},"_npmOperationalInternal":{"tmp":"tmp/strapi-v5-redirects_1.0.4_1773762830458_0.5626434202855033","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@drozd-red/strapi-v5-redirects","version":"1.0.5","keywords":[],"author":"","license":"MIT","_id":"@drozd-red/strapi-v5-redirects@1.0.5","maintainers":[{"name":"anna_andreeva","email":"andreeva.anna2909@gmail.com"},{"name":"r3g3m8","email":"futb.kirill8888@yandex.ru"}],"dist":{"shasum":"19941013924b2211e5710fac144c93b998bb4399","tarball":"https://registry.npmjs.org/@drozd-red/strapi-v5-redirects/-/strapi-v5-redirects-1.0.5.tgz","fileCount":14,"integrity":"sha512-+GAZTvjB5g1ixFCjArcLYqx+y0gSv7w7qD0DG4sBBMHvbs2GVfdG6wX40rP661m9CMd3nEYcL9xA+5Qc5XWo7A==","signatures":[{"sig":"MEYCIQCUCxlSPA4Qivy4ujmSn2ObVMqgcpv0kyskIhGDVLNyjQIhAPBkuU8Kxj7xVrHkhmuWIW+7I6jm/lMYqs8YnO0Ah+DO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":157623},"main":"dist/server/index.js","type":"commonjs","strapi":{"kind":"plugin","name":"redirects","description":"This plugin allows a user to manage redirects from the admin panel.","displayName":"Redirects"},"exports":{"./package.json":"./package.json","./strapi-admin":{"types":"./dist/admin/src/index.d.ts","import":"./dist/admin/index.mjs","source":"./admin/src/index.ts","default":"./dist/admin/index.js","require":"./dist/admin/index.js"},"./strapi-server":{"types":"./dist/server/src/index.d.ts","import":"./dist/server/index.mjs","source":"./server/src/index.ts","default":"./dist/server/index.js","require":"./dist/server/index.js"}},"scripts":{"build":"strapi-plugin build","watch":"strapi-plugin watch","verify":"strapi-plugin verify","watch:link":"strapi-plugin watch:link","test:ts:back":"run -T tsc -p server/tsconfig.json","test:ts:front":"run -T tsc -p admin/tsconfig.json"},"_npmUser":{"name":"anna_andreeva","email":"andreeva.anna2909@gmail.com"},"_npmVersion":"10.8.2","description":"This plugin allows a user to manage redirects from the admin panel.","directories":{},"_nodeVersion":"20.18.1","dependencies":{"qs":"^6.14.0","yup":"^1.7.1","csvtojson":"^2.0.10","react-intl":"^6.7.2","use-debounce":"^10.0.3","@strapi/icons":"^2.0.0-rc.11","@strapi/utils":"^5.0.6","@strapi/design-system":"^2.0.0-rc.11"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.1","prettier":"^3.3.3","@types/qs":"^6.15.0","react-dom":"^18.3.1","typescript":"^5.6.3","@types/react":"^18.3.11","@strapi/strapi":"^5.0.6","@types/react-dom":"^18.3.0","react-router-dom":"^6.26.2","styled-components":"^6.1.13","@strapi/sdk-plugin":"^5.2.6","@strapi/typescript-utils":"^5.0.6"},"peerDependencies":{"react":"^18.3.1","react-dom":"^18.3.1","@strapi/strapi":"^5.0.6","react-router-dom":"^6.26.2","styled-components":"^6.1.13","@strapi/sdk-plugin":"^5.2.6"},"_npmOperationalInternal":{"tmp":"tmp/strapi-v5-redirects_1.0.5_1774431261729_0.02163380406802795","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@drozd-red/strapi-v5-redirects","version":"1.0.6","description":"This plugin allows a user to manage redirects from the admin panel.","keywords":[],"license":"MIT","type":"commonjs","exports":{"./package.json":"./package.json","./strapi-admin":{"types":"./dist/admin/src/index.d.ts","source":"./admin/src/index.ts","import":"./dist/admin/index.mjs","require":"./dist/admin/index.js","default":"./dist/admin/index.js"},"./strapi-server":{"types":"./dist/server/src/index.d.ts","source":"./server/src/index.ts","import":"./dist/server/index.mjs","require":"./dist/server/index.js","default":"./dist/server/index.js"}},"scripts":{"build":"strapi-plugin build","test:ts:back":"run -T tsc -p server/tsconfig.json","test:ts:front":"run -T tsc -p admin/tsconfig.json","verify":"strapi-plugin verify","watch":"strapi-plugin watch","watch:link":"strapi-plugin watch:link"},"dependencies":{"@strapi/design-system":"^2.0.0-rc.11","@strapi/icons":"^2.0.0-rc.11","@strapi/utils":"^5.0.6","csvtojson":"^2.0.10","qs":"^6.14.0","react-intl":"^6.7.2","use-debounce":"^10.0.3","yup":"^1.7.1"},"devDependencies":{"@strapi/sdk-plugin":"^5.2.6","@strapi/strapi":"^5.0.6","@strapi/typescript-utils":"^5.0.6","@types/qs":"^6.15.0","@types/react":"^18.3.11","@types/react-dom":"^18.3.0","prettier":"^3.3.3","react":"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.26.2","styled-components":"^6.1.13","typescript":"^5.6.3"},"peerDependencies":{"@strapi/sdk-plugin":"^5.2.6","@strapi/strapi":"^5.0.6","react":"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.26.2","styled-components":"^6.1.13"},"strapi":{"kind":"plugin","name":"redirects","displayName":"Redirects","description":"This plugin allows a user to manage redirects from the admin panel."},"main":"dist/server/index.js","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"author":"","_id":"@drozd-red/strapi-v5-redirects@1.0.6","_nodeVersion":"20.18.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-jGD/0AGLhoqH2/X0yOYJcAWY6gvNl5vWX5giYIZThNXXj8Wyjg1Jzms3OlFANJh+lwY7bAy22qfE08zIqXfkIw==","shasum":"a34d52a2be317f1558cf97c3ebeaae471ce19630","tarball":"https://registry.npmjs.org/@drozd-red/strapi-v5-redirects/-/strapi-v5-redirects-1.0.6.tgz","fileCount":14,"unpackedSize":157799,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIB6YOSKEy48Obz//0uE9QZV1AvpKQlpQAAYIf8ErR22fAiA+KsaXnqazDVuk+/qkiU5fgLZW+m2ccvy9qNgV58fEoA=="}]},"_npmUser":{"name":"anna_andreeva","email":"andreeva.anna2909@gmail.com"},"directories":{},"maintainers":[{"name":"anna_andreeva","email":"andreeva.anna2909@gmail.com"},{"name":"r3g3m8","email":"futb.kirill8888@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/strapi-v5-redirects_1.0.6_1774521064889_0.5370974558028114"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-17T15:53:50.390Z","modified":"2026-03-26T10:31:05.162Z","1.0.4":"2026-03-17T15:53:50.592Z","1.0.5":"2026-03-25T09:34:21.893Z","1.0.6":"2026-03-26T10:31:05.028Z"},"license":"MIT","keywords":[],"description":"This plugin allows a user to manage redirects from the admin panel.","maintainers":[{"name":"anna_andreeva","email":"andreeva.anna2909@gmail.com"},{"name":"r3g3m8","email":"futb.kirill8888@yandex.ru"}],"readme":"# Strapi Plugin for Managing Redirects\r\n\r\nThis plugin provides a simple way to manage URL redirects within Strapi (v5), allowing developers and content managers to create and handle redirects directly from the CMS. The plugin does not automatically handle redirects on the server side, but instead offers a structured API that your frontend application (like a Next.js site) can use to implement redirection logic.\r\n\r\n![Version](https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000)\r\n[![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen.svg)](https://github.com/alex-strapi/strapi-redirects/#readme)\r\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/alex-strapi/strapi-redirects/graphs/commit-activity)\r\n[![License: MIT](https://img.shields.io/github/license/alex-strapi/strapi-redirects)](https://github.com/alex-strapi/strapi-redirects/blob/master/LICENSE)\r\n[![Twitter: webbist](https://img.shields.io/twitter/follow/webbist.svg?style=social)](https://twitter.com/webbist)\r\n\r\n## Features\r\n\r\n- **Admin Panel Integration:** Adds a \"Redirects\" section in the Strapi admin panel for easy management.\r\n- **Flexible Redirects Management:** Create and manage redirects by specifying the source URL (`Source`), the destination URL (`Destination`), and whether the redirect is permanent (`Permanent`).\r\n- **Bulk Import:** Supports importing redirects in bulk through a CSV upload.\r\n- **API Endpoint:** Redirects are accessible via a structured API endpoint at `/api/redirects`, making it easy for frontend applications to fetch and implement redirects.\r\n- **Redirect Validation:** Validates new redirects to prevent duplicate or looping rules.\r\n\r\n## Getting Started\r\n\r\n### Installation\r\n\r\n1. Install the plugin using npm or yarn:\r\n\r\n`npm install @drozd-red/strapi-v5-redirects` or `yarn add @drozd-red/strapi-v5-redirects`\r\n\r\n2. Enable the plugin in Strapi by adding it to your ./config/plugins.js:\r\n\r\n```\r\nmodule.exports = ({ env }) => ({\r\n  // Other plugin configurations...\r\n  redirects: {\r\n    enabled: true,\r\n  },\r\n});\r\n```\r\n\r\n3. Restart your Strapi server for the changes to take effect.\r\n\r\n## How to Use\r\n\r\n1. Access the Strapi admin panel and locate the `Redirects` section within the plugins area.\r\n2. To add a new redirect, click on `Add New Redirect` and fill in the `Source`, `Destination`, and `Permanent` fields accordingly.\r\n3. After saving, the new redirect will be available at the `api/redirects` endpoint.\r\n4. To fetch redirects, send a GET request to `api/redirects`. The response will be a JSON object listing all configured redirects.\r\n5. Set the permissions of the plugin in Strapi settings > Redirects > FindAll or allow access to this endpoint with an [API token](https://docs.strapi.io/dev-docs/configurations/api-tokens).\r\n\r\n### Strapi REST API Response Limits (optional)\r\n\r\nIf your project contains a large number of redirects (hundreds or thousands), you may need to adjust the default and maximum limits for the REST API responses in Strapi. This can be done by modifying the `api.js` or `api.ts` file in your Strapi configuration. You can set the `defaultLimit` and `maxLimit` for your API responses as shown below:\r\n\r\n```\r\nmodule.exports = ({ env }) => ({\r\n  rest: {\r\n    defaultLimit: 100, // Default number of items returned in a single response\r\n    maxLimit: 250,     // Maximum number of items allowed in a single response\r\n  },\r\n});\r\n```\r\n\r\n### Importing Redirects\r\n\r\nYou can import redirects in bulk by uploading a CSV file with `source`, `destination`, and `permanent` headers. Both relative and absolute paths are supported for maximum flexibility, and specifying `permanent` or `temporary` via a boolean field correctly maps to the respective redirect type.\r\n\r\n## Example Usage with Next.js\r\n\r\nThis 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:\r\n\r\n1. Fetch redirects during the build process to include them in `next.config.js`.\r\n\r\nExample script for fetching redirects:\r\n\r\n```\r\nconst redirects = () => {\r\n  return fetch('http://localhost:1337/api/redirects')\r\n    .then(res => res.json())\r\n    .then(response => {\r\n      // Use redirects however you need to\r\n    });\r\n};\r\n\r\nmodule.exports = redirects;\r\n```\r\n\r\nIncorporate the fetched redirects into next.config.js:\r\n\r\n```\r\nconst getRedirects = require('./redirects');\r\n\r\nmodule.exports = {\r\n  // Other configurations...\r\n  redirects: () => getRedirects(),\r\n};\r\n```\r\n\r\n## Contributions\r\n\r\nContributions in the form of translations, feature enhancements, and bug fixes are highly encouraged and appreciated.\r\n\r\nFeel free to reach out or submit pull requests on GitHub if you're interested in contributing to the development of this plugin.\r\n\r\n## License\r\n\r\nThis plugin is available under the MIT License. For more information, please refer to the LICENSE file in the repository.\r\n","readmeFilename":"README.md"}