Build URL using provided protocol

This commit is contained in:
denkuy 2018-11-02 12:24:22 +01:00
parent 21a3f43103
commit fc1b1e5666

View file

@ -67,7 +67,7 @@ class Proxy {
url = url.replaceAll(_straySlashes, '');
url = '$url/$mapping';
if (!url.startsWith('http')) url = 'http://$url';
if (!url.startsWith(protocol)) url = '$protocol://$url';
url = url.replaceAll(_straySlashes, '');
var headers = <String, String>{