Hi there,
Great plugin! This was extremely handy for people who didn't want Strapi V4's unnecessary data / attributes nesting system.
However, whilst trying to modify the value of "prefix" in my plugin configuration, it seems that none of the changes I make actually affect the resolved prefix when I start the application.
Each time, I delete the .cache
and build
folder, and run a clean strapi build
, nothing seems to make a difference.
Here's my full plugins.js
file, so you can see the other plugins I use:
module.exports = ({ env }) => ({
transformer: {
enabled: true,
config: {
prefix: '/testtest/',
responseTransforms: {
removeAttributesKey: true,
removeDataKey: true
}
}
},
ckeditor: {
enabled: true,
config: {
editor: {
link: {
addTargetToExternalLinks: true,
decorators: {
openInNewTab: {
mode: 'manual',
label: 'Open in a new tab',
defaultValue: true,
attributes: {
target: '_blank',
rel: 'noopener noreferrer'
}
}
}
}
}
}
},
upload: {
config: {
provider: 'aws-s3',
providerOptions: {
accessKeyId: env('AWS_ACCESS_KEY_ID'),
secretAccessKey: env('AWS_ACCESS_SECRET'),
region: env('AWS_REGION'),
params: {
Bucket: env('AWS_BUCKET_NAME'),
},
},
// These parameters could solve issues with ACL public-read access — see [this issue](https://github.com/strapi/strapi/issues/5868) for details
actionOptions: {
upload: {
ACL: null
},
uploadStream: {
ACL: null
},
}
},
}
});
And here's all of my dependencies from package.json
, so you can see what else I'm working with:
"dependencies": {
"@_sh/strapi-plugin-ckeditor": "^1.1.2",
"@strapi/plugin-documentation": "4.5.5",
"@strapi/plugin-graphql": "4.5.5",
"@strapi/plugin-i18n": "4.5.5",
"@strapi/plugin-users-permissions": "4.5.5",
"@strapi/provider-upload-aws-s3": "4.5.5",
"@strapi/strapi": "4.5.5",
"axios": "^0.24.0",
"better-sqlite3": "^7.6.2",
"i": "^0.3.7",
"jsonwebtoken": "^8.5.1",
"jwk-to-pem": "^2.0.5",
"knex": "0.21.18",
"npm": "^9.2.0",
"pg": "^8.7.1",
"strapi-plugin-ckeditor5": "^1.14.0",
"strapi-plugin-transformer": "^2.2.0"
},
Here's a couple of screenshots showing it not working as intended:
![image](https://user-images.githubusercontent.com/113593044/213505558-23ac6e33-2afa-4d67-b8bf-10d5400a930b.png)
![image](https://user-images.githubusercontent.com/113593044/213505646-ca8a08b4-d523-4e13-af4b-21092be67eb8.png)
It would be fantastic if you could find / fix the issue that's going on here! I'll happily provide any other info you might need.
For context, I'm using AWS Cloudfront and a reverse proxy to host the frontend and backend under the same URL. Anything that's api/*
defaults to the Strapi backend. This worked on V3, but upgrading to V4 has caused our endpoints to now become api/api/articles
, which we expected.
If I can't outright get rid of the second /api/
, then I'll just rename it to /api/v1/*
, so it doesn't look as bad.
Thanks in advance for any help / advice you can provide!