1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-06-17 22:37:33 +02:00
Commit Graph

5 Commits

Author SHA1 Message Date
524434b63f Drop dependency + use built-in base64url (#1156)
* Drop dependency + use built-in `base64url`

[`create-hmac`](https://github.com/browserify/createHmac) is meant for compat between node and browser compat and was last updated in 2018.

Computing the HMAC signature on the client (browser) does not make any sense in 99% of the use-cases, as the secrets would be needed on the client side.
This means that we can drop browser support and just use the native node module, which is also exported by the `create-hmac` when running on node.

`Buffer.toString()` also accepts "base64url" as an encoding, so we can drop the `urlSafeBase64` in favor of that.

* Use encoder from hmac instance
2023-05-24 19:30:00 +06:00
aed4ab8753 Cleanup examples 2022-09-03 00:58:54 +06:00
ceb9a61976 Remove basic URL format 2021-03-15 18:06:01 +06:00
fd206600a5 Fixed browser usage
Using `const createHmac = require('create-hmac')` will ensure that this script will work both on Node.js and Browser (otherwise it will crash on browser).
I've also updated `new Buffer` on line 7, which is deprecated in flavor of `Buffer.from`
2019-09-04 23:31:20 +02:00
d533b65ca0 add new signature example file for node.js 2017-09-29 15:52:24 +08:00