-
Notifications
You must be signed in to change notification settings - Fork 3
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
DPLT-1044 Add context.fetchFromSocialApi
#134
Conversation
I think it'd be worth putting the |
@gabehamilton what is the motive for keeping things locked down? Is there risk in exposing |
@gabehamilton maybe we can have |
fetchFromSocialApi sounds great |
fetch
to context
context.fetchFromSocialApi
@@ -266,6 +264,9 @@ export default class Indexer { | |||
value | |||
); | |||
}, | |||
fetchFromSocialApi: async (path, options) => { |
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.
Only adding to imperative as it doesn't make sense in a functional context, in most cases you want to use the result of fetch.
317061a
to
ef44c62
Compare
ref: #131
This PR limits the
fetch
function exposed to the VM to onlyapi.near.social
. This limits the potential security vulnerabilities that come with exposingfetch
as is.