preserve current protocol for static files
updated changes