Skip to content

Commit

Permalink
Add support to pass auth_token (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
YomesInc authored Apr 7, 2022
1 parent 5a4cc45 commit 3738d66
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,5 +377,9 @@ export default function url(publicId, options = {}, config = {}) {
}
resultUrl = `${resultUrl}${appender}_a=${sdkAnalyticsSignature}`;
}
if (options.auth_token) {
let appender = resultUrl.indexOf('?') >= 0 ? '&' : '?';
resultUrl = `${resultUrl}${appender}__cld_token__=${options.auth_token}`;
}
return resultUrl;
};
8 changes: 8 additions & 0 deletions test/spec/automatic/cloudinary-spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3738d66

Please sign in to comment.