uses x-fowarded-proto header if exists