Created
February 6, 2017 16:24
-
-
Save iptpv/25607be858dc55abcf4aa445dbd46ae9 to your computer and use it in GitHub Desktop.
This file contains 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
_.reduceRight(_.compact(a.replace(/\n/g, '').split(' ')), function(res, el, i) { | |
return i%2 === 1 ? res + 'location /sp/' + el.replace(/;/, '') + '/ { return 302 http://': res + el + '; }\n'}, | |
''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment