Closed codymwalker closed 9 years ago
It doesn't appear that you can get out of the directory being served. Regardless of what is entered, it seems to handle it before passing it off to the path module. So http://localhost:1880/swagger-ui/reqs/../../index.js translates to http://localhost:1880/index.js which produces a 404 error. The only place that you can go up one level is if you pass a single '/..' after the /reqs/ path, which will take you up to http://localhost:1880/swagger-ui/, which we're serving up anyway.
I had a feeling that express did that for us, but could remember for certain. Good to have checked it though, thanks.
That was my thought. I figured it wasn't going to be there too terribly long.
Incorporates Swagger-UI into the editor, creating a new tab where the user can view and test the swagger doc that is being dynamically generated by the plugin.
For now, the user will have to manually refresh the swagger-ui to get the newly generated swagger doc after making changes and deploying. This will be changed once there is an api to tap into node-red's events.