Solved.
For others having the same problem, use this insted:
e.Use(middleware.Static())
and add the relative path to the static content folder.