You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 7, 2019. It is now read-only.
The idea is to create a template for the command faastruby new that would initialize a folder with a function already prepared to serve Javascript and CSS.
The command could be, for example:
~$ faastrubynewFUNCTION_NAME --templateassets
Note that we must have templates for all the supported runtimes (--runtime).
There's also the need for sanitizing the input. For example, we don't want to allow js=../foo.js (which would not result in anything bad because the platform is secured against stuff like that - but it is better to avoid anyways). So there's a need for some sort of regular expression to remove everything fromcss= and js= but letters, numbers, dashes, underlines and one period.
The above is just a suggestion. Feel free to propose something better.
The text was updated successfully, but these errors were encountered:
parruda
changed the title
Add templates for asset-functions that carry Javascript and CSS
Add templates for asset-functions that serve Javascript and CSS
Feb 3, 2019
The idea is to create a template for the command
faastruby new
that would initialize a folder with a function already prepared to serve Javascript and CSS.The command could be, for example:
Note that we must have templates for all the supported runtimes (--runtime).
The resulting folder could look like this:
Example requests:
/workspace-name/function-name?css=application.css
/workspace-name/function-name?js=application.js
And an example Ruby function could be like:
There's also the need for sanitizing the input. For example, we don't want to allow
js=../foo.js
(which would not result in anything bad because the platform is secured against stuff like that - but it is better to avoid anyways). So there's a need for some sort of regular expression to remove everything fromcss=
andjs=
but letters, numbers, dashes, underlines and one period.The above is just a suggestion. Feel free to propose something better.
The text was updated successfully, but these errors were encountered: