Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request type
Check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
When using the node.image program, the
crossOrigin
attribute is hardcoded to""
(anonymous fetch). If the img resource requires credentials, then image requests will always fail with HTTP 401, and the requested images will never be rendered on nodes.What is the new behavior?
Builds on PR #1147, where rather than hardcoding the
crossOrigin
attribute, the caller can provide a param value. Param value must be a valid HTML img crossOrigin value (TS check only). No breaking change in behavior - newparams
arg is optional. Also, FWIW, I've added anull
param value which allows a user to override the behavior from PR #1147 and not specify a crossOrigin attribute.This change specifically supports the (my) use case where node image URL resources are protected by a layer of authentication.
Other information
https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin