-
Notifications
You must be signed in to change notification settings - Fork 21
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
Proposal: add support to expose functions on a public domain #22
base: master
Are you sure you want to change the base?
Conversation
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.
I also miss some linting on the entire Functions code...
data.exposed = 'true'; | ||
} else if (code.exposed === false) { | ||
data.exposed = 'false'; | ||
} |
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.
All of this could be:
data.exposed = code.exposed.toString();
https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Boolean/toString
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.
This is a nice-to-have feature. Please, fix conflicts, lint your files and follow recommendations from @heitorsilva
8dee678
to
eab0f61
Compare
c3c3f61
to
9297c26
Compare
Each function could have a new boolean attribute named
exposed
, besides that, the server could accept connection on a public domain specified by the environment variable.All exposed function may be accessible on
http://${EXPOSABLE_HOST}/${namespace}/${functionID}
, avoiding to expose the private API on the same domain.