Created
April 6, 2020 13:27
-
-
Save ArnaudBuchholz/8dd3865fb1a89004b23a71771feee45a 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: `https://openui5.hana.ondemand.com/${version}/resources/${ui5Path}` | |
| }) | |
| response.end() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment