Skip to content

Commit c9f96bc

Browse files
committed
chore: check proxy data
1 parent 63b9527 commit c9f96bc

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

server/api/registry/image-proxy/index.get.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,18 @@ export default defineEventHandler(async event => {
4848
if (!sig) {
4949
return { sig }
5050
}
51+
return {"ok": true, url, sig};
5152

5253
// Verify HMAC signature to ensure this URL was generated server-side
53-
const { imageProxySecret } = useRuntimeConfig()
54-
if (!imageProxySecret || !verifyImageUrl(url, sig, imageProxySecret)) {
55-
// throw createError({
56-
// statusCode: 403,
57-
// message: 'Invalid signature.',
58-
// })
59-
return {url, sig, imageProxySecret}
60-
}
61-
return {"ok": true};
54+
// const { imageProxySecret } = useRuntimeConfig()
55+
// if (!imageProxySecret || !verifyImageUrl(url, sig, imageProxySecret)) {
56+
// // throw createError({
57+
// // statusCode: 403,
58+
// // message: 'Invalid signature.',
59+
// // })
60+
// return {url, sig, imageProxySecret}
61+
// }
62+
// return {"ok": true};
6263

6364
// // Validate URL syntactically
6465
// if (!isAllowedImageUrl(url)) {

0 commit comments

Comments
 (0)