Skip to content

Commit

Permalink
Merge pull request #31 from strapi/fix/preview
Browse files Browse the repository at this point in the history
fix: preview url
  • Loading branch information
Mcastres authored Jan 27, 2025
2 parents 516011b + 8a6784f commit 2f22d94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions strapi/config/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default ({ env }) => ({
preview: {
enabled: true,
config: {
allowedOrigins: [env('CLIENT_URL')],
allowedOrigins: [env('STRAPI_ADMIN_CLIENT_URL')],
async handler(uid, { documentId, locale, status }) {
const document = await strapi.documents(uid).findOne({
documentId, populate: null,
Expand All @@ -33,7 +33,7 @@ export default ({ env }) => ({
status
});

const previewURL = `${env('CLIENT_URL')}/api/preview?${urlSearchParams}`
const previewURL = `${env('STRAPI_ADMIN_CLIENT_URL')}/api/preview?${urlSearchParams}`

return previewURL
},
Expand Down

0 comments on commit 2f22d94

Please sign in to comment.