You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Use Netlify Host with Production Context (#47)
# Description
The build plugin currently primarily utilizes the `DEPLOY_PRIME_URL`
environment variable to determine the Netlify host for building URLs
specifically with the Fetch API. The issues is that in production
context, this URL will still prepend the branch (like "main") instead of
the primary Netlify host.
This checks the deploy context and if its production, uses the
`NETLIFY_HOST` variable which includes that primary host.
## Issue Ticket Number
<!-- Specifiy which issue this fixes by referencing the issue number
(`#11`) or issue URL. -->
<!-- Example: Fixes#1 -->
Fixes#45
## Type of change
<!-- Please select all options that are applicable. -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
# Checklist
<!-- These must all be followed and checked. -->
- [ ] I have followed the contributing guidelines of this project as
mentioned in [CONTRIBUTING.md](/CONTRIBUTING.md)
- [ ] I have created an
[issue](https://github.com/colbyfayock/netlify-plugin-cloudinary/issues)
ticket for this PR
- [ ] I have checked to ensure there aren't other open [Pull
Requests](https://github.com/colbyfayock/netlify-plugin-cloudinary/pulls)
for the same update/change?
- [ ] I have performed a self-review of my own code
- [ ] I have run tests locally to ensure they all pass
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes needed to the documentation
ERROR_CLOUD_NAME_REQUIRED: 'A Cloudinary Cloud Name is required. Please set cloudName input or use the environment variable CLOUDINARY_CLOUD_NAME',
3
3
ERROR_NETLIFY_HOST_UNKNOWN: 'Cannot determine Netlify host, can not proceed with plugin.',
4
-
EEROR_NETLIFY_HOST_CLI_SUPPORT: 'Note: The Netlify CLI does not currently support the ability to determine the host locally, try deploying on Netlify.'
4
+
ERROR_NETLIFY_HOST_CLI_SUPPORT: 'Note: The Netlify CLI does not currently support the ability to determine the host locally, try deploying on Netlify.'
to: `https://res.cloudinary.com/${process.env.CLOUDINARY_CLOUD_NAME}/image/${deliveryType}/f_auto,q_auto/${process.env.DEPLOY_PRIME_URL}/cld-assets${imagesPath}/:splat`,
0 commit comments