build: Karma proxy should convert Host header
authorAntoine Musso <hashar@free.fr>
Tue, 20 Dec 2016 15:46:20 +0000 (16:46 +0100)
committerKrinkle <krinklemail@gmail.com>
Fri, 23 Dec 2016 01:56:26 +0000 (01:56 +0000)
commit3409dc52723d63b790756762ec01c7f137a30440
tree69eb4de9796af206ad58c237765b4ebdcfab229c
parent272c029ed992dc7fcbc5146f6dd9ec6d543977f4
build: Karma proxy should convert Host header

By default the Karma proxy does requests against 'localhost', however
if the target wiki server has strict host validation (e.g. multiple
virtual hosts or otherwise strictly verified) then requests may fail
since load.php is not found. An example is with MW_SERVER=devwiki.local.

MediaWiki-Vagrant and Wikimedia CI are not affected since they use
'localhost' as the virtual host.

Set Karma proxy to change the hostname accordingly.

Reference:
 https://github.com/karma-runner/karma/issues/1729
 https://github.com/karma-runner/karma/commit/ae05ea4

Bug: T153757
Change-Id: I317d5686aecd1fb6cf6921cdca77670cded85607
Gruntfile.js