Created
April 6, 2020 13:31
-
-
Save ArnaudBuchholz/2300cb9b81d4c99525a6722c83bd0fa9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = async function (request, response, ui5Path) { | |
| const { referer } = request.headers | |
| const version = (/\bversion\b=(\d+\.\d+\.\d+)/.exec(referer) || [0, '1.76.0'])[1] | |
| response.writeHead(302, { | |
| Location: `/@openui5/${version}/${ui5Path}` | |
| }) | |
| response.end() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment