예제 #1
0
        private static void UseLaterListStaticFiles(IApplicationBuilder app, IHostEnvironment env)
        {
            var webRootPath  = env.GetWebRootPath();
            var fileProvider = webRootPath != null
                ? (IFileProvider) new PhysicalFileProvider(webRootPath)
                : new NullFileProvider();

            var staticFileOptions = new StaticFileOptions {
                FileProvider = fileProvider
            };

            app.UseStaticFiles(staticFileOptions);
        }