Revert "refactored middleware"

This reverts commit db6dbf2715e1d45d9a9746ebe3b190b9b4077bec.
added back build-pipeline to core
changed static files to return as file rather than input stream
removed headers from middleware asset response