def wsgi_middleware(self, app, cors=False):
        """WSGI middlewares that wraps the given ``app`` and serves
        actual image files. ::

            fs_store = HttpExposedFileSystemStore('userimages', 'images/')
            app = fs_store.wsgi_middleware(app)

        :param app: the wsgi app to wrap
        :type app: :class:`~typing.Callable`\ [[],
            :class:`~typing.Iterable`\ [:class:`bytes`]]
        :returns: the another wsgi app that wraps ``app``
        :rtype: :class:`StaticServerMiddleware`

        """
        _app = StaticServerMiddleware(app, '/' + self.prefix, self.path,
                                      cors=self.cors)

        def app(environ, start_response):
            if not hasattr(self, 'host_url'):
                self.host_url = (environ['wsgi.url_scheme'] + '://' +
                                 environ['HTTP_HOST'] + '/')
            return _app(environ, start_response)
        return app