-
Couldn't load subscription status.
- Fork 56
feat: sign record's public url #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
17241fe
3b40e57
13cdc63
b01c22a
7a74be9
a404dbf
23505f1
af0f70b
d2a11f3
1bf60b2
d830ed1
9477a14
cf7144e
00a96f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,15 +58,15 @@ | |
| "@apify/input_secrets": "^1.1.40", | ||
| "@apify/log": "^2.4.3", | ||
| "@apify/timeout": "^0.3.0", | ||
| "@apify/utilities": "^2.9.3", | ||
| "@crawlee/core": "^3.9.0", | ||
| "@crawlee/types": "^3.9.0", | ||
| "@crawlee/utils": "^3.9.0", | ||
| "@apify/utilities": "^2.13.0", | ||
| "@crawlee/core": "^3.12.3-beta.12", | ||
| "@crawlee/types": "^3.12.3-beta.12", | ||
| "@crawlee/utils": "^3.12.3-beta.12", | ||
| "apify-client": "^2.11.1", | ||
|
||
| "fs-extra": "^11.2.0", | ||
| "ow": "^0.28.2", | ||
| "semver": "^7.5.4", | ||
| "tslib": "^2.6.2", | ||
| "ws": "^8.18.0" | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| import { createHmacSignature } from '@apify/utilities'; | ||
| import type { StorageManagerOptions } from '@crawlee/core'; | ||
| import { KeyValueStore as CoreKeyValueStore } from '@crawlee/core'; | ||
|
|
||
|
|
@@ -19,7 +20,11 @@ export class KeyValueStore extends CoreKeyValueStore { | |
| return getPublicUrl.call(this, key); | ||
| } | ||
|
|
||
| return `https://api.apify.com/v2/key-value-stores/${this.id}/records/${key}`; | ||
| if (!this.storageObject?.urlSigningSecretKea) { | ||
|
||
| return `https://api.apify.com/v2/key-value-stores/${this.id}/records/${key}`; | ||
| } | ||
|
|
||
| return `https://api.apify.com/v2/key-value-stores/${this.id}/records/${key}?signature=${createHmacSignature(this.storageObject.urlSigningSecretKea as string, key)}`; | ||
|
||
| } | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and don't forget to bump this