UNPKG

@imgproxy/imgproxy-node

Version:

Official node url-builder lib for imgproxy - fast and secure standalone server for resizing and converting remote images

10 lines (9 loc) 336 B
import getSignedUrl from "../utils/getSignedUrl.js"; import getSignPair from "../utils/getSignPair.js"; const finalizePath = ({ options, salt, key }) => { const signPair = getSignPair({ salt, key }); return signPair ? `${getSignedUrl(options, signPair)}` : `/insecure${options}`; }; export default finalizePath;