{"id":1072,"date":"2023-09-13T17:46:24","date_gmt":"2023-09-13T15:46:24","guid":{"rendered":"https:\/\/epicmarketing.co.il\/notebook\/?p=1072"},"modified":"2023-09-14T07:17:30","modified_gmt":"2023-09-14T05:17:30","slug":"middlewares","status":"publish","type":"post","link":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/","title":{"rendered":"Middlewares"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u05d4\u05de\u05e9\u05da \u05d4\u05ea\u05d5\u05db\u05e0\u05d9\u05ea \u05de\u05de\u05d0\u05de\u05e8 <a href=\"https:\/\/epicmarketing.co.il\/notebook\/starting-net-core-7\/\">\u05d4\u05d4\u05e7\u05d3\u05de\u05d4<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d4\u05d5\u05e4\u05e0\u05e7\u05e6\u05d9\u05d4 Run \u05e0\u05db\u05e0\u05e1\u05ea \u05dc\u05de\u05e9\u05e4\u05d7\u05ea \u05d4-Middlewares.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05db\u05dc \u05d1\u05e7\u05e9\u05d4 \u05e9\u05de\u05d2\u05d9\u05e2\u05d4 \u05dc\u05e9\u05e8\u05ea \u05e0\u05db\u05e0\u05e1\u05ea \u05d3\u05e8\u05da Middlewares \u05e9\u05d4\u05ea\u05e4\u05e7\u05d9\u05d3 \u05e9\u05dc\u05d4\u05dd \u05dc\u05d1\u05e6\u05e2 \u05e4\u05e2\u05d5\u05dc\u05d5\u05ea \u05e2\u05dc \u05d4\u05d1\u05e7\u05e9\u05d4. \u05db\u05dc \u05d0\u05d7\u05d3 \u05de\u05d1\u05e6\u05e2 \u05e4\u05e2\u05d5\u05dc\u05d4 \u05d5\u05d0\u05d6 \u05e0\u05e7\u05e8\u05d0 \u05d4-Middleware \u05d4\u05d1\u05d0.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05dc\u05de\u05e9\u05dc, \u05d0\u05dd \u05d0\u05e0\u05d9 \u05e8\u05d5\u05e6\u05d4 \u05e9\u05d9\u05d4\u05d9\u05d4 \u05dc\u05d9 \u05dc\u05d5\u05d2 \u05db\u05e0\u05d9\u05e1\u05d4 \u05d5\u05d9\u05e6\u05d9\u05d0\u05d4 \u05e9\u05dc \u05d1\u05e7\u05e9\u05d4 \u05e9\u05de\u05d2\u05d9\u05e2\u05d4 \u05d0\u05e4\u05e9\u05e8 \u05dc\u05d1\u05e0\u05d5\u05ea Middleware \u05e9\u05d9\u05db\u05ea\u05d5\u05d1 \u05dc\u05dc\u05d5\u05d2 \u05d1\u05db\u05e0\u05d9\u05e1\u05d4 \u05d5\u05d1\u05d9\u05e6\u05d9\u05d0\u05d4. \u05d5\u05d0\u05d6 \u05d0\u05e4\u05e9\u05e8 \u05d2\u05dd \u05dc\u05d3\u05e2\u05ea \u05db\u05de\u05d4 \u05d6\u05de\u05df \u05dc\u05e7\u05d7\u05d4 \u05d4\u05e4\u05e2\u05d5\u05dc\u05d4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d9\u05e9 Middlewares \u05e7\u05d9\u05d9\u05de\u05d9\u05dd, \u05dc\u05de\u05e9\u05dc \u05e9\u05dc Auth.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Middlewares  \u05db\u05d5\u05ea\u05d1\u05d9\u05dd \u05d1\u05e7\u05d1\u05e6\u05d9\u05dd \u05e0\u05e4\u05e8\u05d3\u05d9\u05dd \u05d1\u05e6\u05d5\u05e8\u05d4 \u05de\u05e1\u05d5\u05d3\u05e8\u05ea. \u05db\u05d0\u05df \u05d1\u05e9\u05d1\u05d9\u05dc \u05d4\u05d3\u05d5\u05d2\u05de\u05d0 \u05e0\u05db\u05ea\u05d5\u05d1 \u05d1\u05e7\u05d5\u05d1\u05e5 program.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">app.Use<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">app.Use \u05de\u05e7\u05d1\u05dc callback \u05e9\u05de\u05e7\u05d1\u05dc context \u05d5-next. \u05d1\u05ea\u05d5\u05da \u05d4-callback \u05e0\u05d1\u05e6\u05e2 \u05e4\u05e2\u05d5\u05dc\u05d5\u05ea \u05db\u05d3\u05d9 \u05dc\u05e8\u05d0\u05d5\u05ea \u05d0\u05ea \u05e4\u05e2\u05d5\u05dc\u05ea \u05d4-middleware. \u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-Run \u05d4\u05d5\u05d0 \u05d1\u05e1\u05d5\u05e3 \u05e9\u05dc \u05ea\u05d4\u05dc\u05d9\u05da, Use \u05d4\u05d5\u05d0 \u05d7\u05dc\u05e7 \u05de\u05d4\u05ea\u05d4\u05dc\u05d9\u05da, \u05d9\u05e9 \u05d0\u05d7\u05e8\u05d9\u05d5 \u05e4\u05e2\u05d5\u05dc\u05d5\u05ea \u05d4\u05de\u05e9\u05da.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05e7\u05d5\u05d1\u05e5 program.cs<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\napp.Use(async (context, next) =&gt; {\n    await context.Response.WriteAsync(&quot;MID 1 Start  &quot;);\n    await next();\n    await context.Response.WriteAsync(&quot;MID 1 End    &quot;);\n});\n\napp.Use(async (context, next) =&gt; {\n    await context.Response.WriteAsync(&quot;MID 2 Start  &quot;);\n    await next();\n    await context.Response.WriteAsync(&quot;MID 2 End    &quot;);\n});\n\napp.Run(async (context) =&gt; {\n    await context.Response.WriteAsync(&quot;Hello World  &quot;);\n});\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05db\u05dc \u05d1\u05e7\u05e9\u05d4 \u05de\u05ea\u05d7\u05d9\u05dc\u05d4 \u05dc\u05e2\u05d1\u05d5\u05e8 \u05ea\u05d4\u05dc\u05d9\u05da, \u05e2\u05d5\u05d1\u05e8\u05ea \u05d3\u05e8\u05da \u05d4-Middlewares  \u05d5\u05d7\u05d5\u05d6\u05e8\u05ea \u05d3\u05e8\u05db\u05dd. \u05d4-Middleware \u05d4\u05e8\u05d0\u05e9\u05d5\u05df \u05de\u05ea\u05d7\u05d9\u05dc \u05dc\u05e2\u05d1\u05d5\u05d3, \u05d0\u05d7\u05e8 \u05db\u05da \u05d9\u05e9 \u05d0\u05ea next \u05e9\u05d0\u05d5\u05de\u05e8\u05ea \u05ea\u05e4\u05e2\u05d9\u05dc \u05d0\u05ea \u05d4-Middleware \u05d4\u05d1\u05d0, \u05d9\u05e9 \u05dc\u05e0\u05d5 \u05de\u05e2\u05d1\u05e8 \u05dc-Middleware \u05d4\u05e9\u05e0\u05d9, \u05d4\u05d1\u05d0 \u05d9\u05e9 \u05dc\u05d5 \u05d2\u05dd next \u05d5\u05d4\u05d5\u05d0 \u05d9\u05e4\u05e2\u05d9\u05dc \u05d0\u05ea \u05d4-Run.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d4-Run \u05e1\u05d9\u05d9\u05dd, \u05d9\u05d7\u05d6\u05d5\u05e8 \u05dc-Middleware \u05d4\u05e9\u05e0\u05d9 \u05d5\u05d4\u05d5\u05d0 \u05d9\u05d7\u05d6\u05d5\u05e8 \u05dc\u05e8\u05d0\u05e9\u05d5\u05df. \u05db\u05dc Middleware \u05de\u05e7\u05d1\u05dc \u05db\u05e4\u05e8\u05de\u05d8\u05e8 \u05d0\u05ea \u05d4-Middleware \u05d4\u05d1\u05d0 \u05d5\u05d4\u05d5\u05d0 \u05d9\u05db\u05d5\u05dc \u05dc\u05e7\u05d1\u05dc \u05d4\u05d7\u05dc\u05d8\u05d4 \u05d4\u05d0\u05dd \u05dc\u05d4\u05e4\u05e2\u05d9\u05dc \u05d0\u05ea \u05d4-Middleware \u05d4\u05d1\u05d0 \u05d0\u05d5 \u05dc\u05d0.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d5\u05d6\u05d4 \u05de\u05d4 \u05e9\u05e0\u05e8\u05d0\u05d4:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware.jpg\" alt=\"\" class=\"wp-image-1086\" style=\"width:419px;height:65px\" width=\"419\" height=\"65\" srcset=\"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware.jpg 521w, https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware-300x47.jpg 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d4\u05d6\u05d3\u05d4\u05d5\u05ea \u05d5-auth \u05d6\u05d4 \u05de\u05e9\u05d4\u05d5 \u05e7\u05dc\u05d0\u05e1\u05d9 \u05dc\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-Middleware, \u05db\u05db\u05d4 \u05d9\u05e9 \u05dc\u05d9 \u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05dc\u05d4\u05e2\u05d1\u05d9\u05e8 \u05d0\u05ea \u05db\u05dc \u05d4\u05d1\u05e7\u05e9\u05d5\u05ea \u05d3\u05e8\u05da \u05d4\u05d0\u05d9\u05de\u05d5\u05ea \u05d4\u05d6\u05d4.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Built-In Custom Middleware<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u05e0\u05d5\u05e1\u05d9\u05e3 \u05dc\u05e4\u05e8\u05d5\u05d9\u05e7\u05d8 \u05ea\u05d9\u05e7\u05d9\u05d9\u05d4 \u05d1\u05e9\u05dd wwwroot, \u05d4\u05e9\u05dd \u05d4\u05d5\u05d0 \u05de\u05d5\u05e1\u05db\u05de\u05d4 \u05dc\u05ea\u05d9\u05e7\u05d9\u05d9\u05d4 \u05e9\u05dc \u05e7\u05d1\u05e6\u05d9\u05dd \u05e1\u05d8\u05d8\u05d9\u05d9\u05dd. \u05dc\u05ea\u05d9\u05e7\u05d9\u05d9\u05d4 \u05e0\u05d5\u05e1\u05d9\u05e3 new item \u05e9\u05dc html page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05e0\u05d5\u05e1\u05d9\u05e3 \u05db\u05d5\u05ea\u05e8\u05ea \u05db\u05dc\u05e9\u05d4\u05d9 \u05dc\u05de\u05e1\u05de\u05da \u05d5\u05e0\u05e8\u05d9\u05e5 \u05d0\u05ea \u05d4\u05e4\u05e8\u05d5\u05d9\u05d9\u05e7\u05d8.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05e0\u05e7\u05d1\u05dc \u05d0\u05ea \u05d4\u05d8\u05e7\u05e1\u05d8 \u05e9\u05d4\u05d3\u05e4\u05e1\u05e0\u05d5 \u05d1-middlewares, \u05d5\u05d0\u05dd \u05e0\u05db\u05e0\u05d9\u05e1 \u05d0\u05ea \u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e2\u05de\u05d5\u05d3 \u05e9\u05dc\u05e0\u05d5, \u05e9\u05d1\u05de\u05e7\u05e8\u05d4 \u05d4\u05d6\u05d4 \u05d4\u05d9\u05d0 htmlpage.html, \u05e0\u05e7\u05d1\u05dc \u05d0\u05ea \u05d0\u05d5\u05ea\u05d5 \u05d4\u05d3\u05d1\u05e8. \u05dc\u05d0 \u05e0\u05e7\u05d1\u05dc \u05d0\u05ea \u05d4\u05d3\u05e3, \u05db\u05d9 \u05db\u05e8\u05d2\u05e2 \u05d0\u05d9\u05df \u05e9\u05d5\u05dd \u05d3\u05d1\u05e8 \u05d1\u05d1\u05e7\u05e9\u05d4 \u05e9\u05dc\u05e0\u05d5 \u05e9\u05de\u05d8\u05e4\u05dc \u05d1\u05d4\u05e6\u05d2\u05ea \u05d3\u05e3 \u05d4-html.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05db\u05d3\u05d9 \u05dc\u05e7\u05d1\u05dc \u05d0\u05ea \u05d4\u05d3\u05e3 \u05e0\u05db\u05e0\u05d9\u05e1 \u05d1\u05e8\u05d0\u05e9 \u05e8\u05e9\u05d9\u05de\u05ea \u05d4-middlewares \u05d0\u05ea \u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-staticfiles.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\napp.UseStaticFiles();\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d4 app.UseStaticFiles \u05d9\u05d5\u05d3\u05e2\u05ea \u05dc\u05d8\u05e4\u05dc \u05d1\u05d4\u05e0\u05d2\u05e9\u05ea \u05d4\u05e7\u05d1\u05e6\u05d9\u05dd \u05d4\u05e1\u05d8\u05d8\u05d9\u05d9\u05dd \u05db\u05d0\u05e9\u05e8 \u05d4\u05dd \u05e0\u05de\u05e6\u05d0\u05d9\u05dd \u05d1\u05ea\u05d9\u05e7\u05d9\u05d9\u05ea wwwroot. \u05d5\u05d0\u05dd \u05e2\u05db\u05e9\u05d9\u05d5 \u05e0\u05e8\u05d9\u05e5 \u05d0\u05ea \u05d4\u05e4\u05e8\u05d5\u05d9\u05d9\u05e7\u05d8 \u05d5\u05e0\u05dc\u05da \u05dc\u05e2\u05de\u05d5\u05d3 \u05d4-html \u05e9\u05d1\u05e0\u05d9\u05e0\u05d5, \u05e0\u05e7\u05d1\u05dc \u05d0\u05ea \u05d4\u05ea\u05d5\u05db\u05df \u05e9\u05dc\u05d5.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d0\u05dd \u05e0\u05e9\u05d9\u05dd \u05db\u05ea\u05d5\u05d1\u05ea \u05e9\u05dc \u05e7\u05d5\u05d1\u05e5 \u05e9\u05dc\u05d0 \u05e7\u05d9\u05d9\u05dd, \u05e0\u05d7\u05d6\u05d5\u05e8 \u05dc\u05e8\u05d0\u05d5\u05ea \u05d0\u05ea \u05d4\u05d3\u05e4\u05e1\u05ea \u05d4-middlewares. \u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05dc\u05d0 \u05d4\u05d9\u05d4 \u05e7\u05d5\u05d1\u05e5, \u05d4-UseStaticFiles \u05de\u05de\u05e9\u05d9\u05da \u05dc\u05d1\u05e6\u05e2 \u05d0\u05ea \u05de\u05d4 \u05e9\u05d1\u05d0 \u05d0\u05d7\u05e8\u05d9\u05d5.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05db\u05dc middleware \u05d9\u05db\u05d5\u05dc \u05dc\u05d4\u05d7\u05dc\u05d9\u05d8 \u05d4\u05d0\u05dd \u05dc\u05d4\u05ea\u05e7\u05d3\u05dd \u05dc-middleware \u05d0\u05d5 \u05dc\u05d0, \u05d5\u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05d9\u05e9 \u05dc\u05e0\u05d5 \u05d3\u05e8\u05da \u05d4\u05dc\u05d5\u05da \u05d7\u05d6\u05d5\u05e8 \u05d3\u05e8\u05db\u05dd, \u05d0\u05e0\u05d7\u05e0\u05d5 \u05d9\u05db\u05d5\u05dc\u05d9\u05dd \u05dc\u05d9\u05e6\u05d5\u05e8 middleware \u05e9\u05d9\u05ea\u05e4\u05d5\u05e1 \u05d0\u05ea \u05d4\u05e9\u05d2\u05d9\u05d0\u05d5\u05ea \u05e9\u05dc \u05db\u05dc \u05d4\u05d0\u05d7\u05e8\u05d9\u05dd \u05e9\u05d1\u05d3\u05e8\u05da.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\napp.Use(async (context, next) =&gt; {\n    try {\n        await next();\n    }\n    catch {\n        throw;\n    }\n});\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Custom Middleware<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u05db\u05d3\u05d9 \u05dc\u05db\u05ea\u05d5\u05d1 middleware \u05d1\u05e6\u05d5\u05e8\u05d4 \u05e0\u05db\u05d5\u05e0\u05d4, \u05e0\u05d5\u05e1\u05d9\u05e3 \u05d0\u05d5\u05ea\u05d5 \u05dc\u05e4\u05e8\u05d5\u05d9\u05d9\u05e7\u05d8 \u05d3\u05e8\u05da \u05e7\u05dc\u05d9\u05e7 \u05d9\u05de\u05e0\u05d9 \u05e2\u05dc \u05e9\u05dd \u05d4\u05e4\u05e8\u05d5\u05d9\u05d9\u05e7\u05d8 -> add item \u05d5\u05e9\u05dd \u05dc\u05d1\u05d7\u05d5\u05e8 Middleware class. \u05dc\u05ea\u05ea \u05e9\u05dd \u05dc-middleware. \u05db\u05d3\u05d0\u05d9 \u05dc\u05e8\u05db\u05d6 \u05d0\u05ea \u05db\u05dc \u05d4-middlewares \u05d1\u05ea\u05d9\u05e7\u05d9\u05d9\u05ea middlewares.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d0\u05e0\u05d7\u05e0\u05d5 \u05de\u05e7\u05d1\u05dc\u05d9\u05dd class \u05de\u05d5\u05db\u05df \u05dc\u05e4\u05e2\u05d5\u05dc\u05d4 \u05d5\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d9\u05ea CustomMiddlewareExtensions \u05db\u05d3\u05d9 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4-Middleware \u05d1\u05e6\u05d5\u05e8\u05d4 \u05e4\u05e9\u05d5\u05d8\u05d4 \u05dc\u05ea\u05d5\u05db\u05e0\u05d9\u05ea. \u05db\u05d3\u05d9  \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05dc\u05de\u05e9\u05dc \u05d0\u05ea \u05d4-CustomMiddleware \u05e9\u05d9\u05e6\u05e8\u05ea\u05d9, \u05db\u05dc \u05de\u05d4 \u05e9\u05e6\u05e8\u05d9\u05da \u05d6\u05d4:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05e7\u05d5\u05d1\u05e5 program.cs<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\napp.UseCustomMiddleware();\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d5\u05e6\u05e8\u05d9\u05da \u05e8\u05e7 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05dc\u05e7\u05d5\u05d1\u05e5 \u05d4-global using \u05d0\u05ea:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05e7\u05d5\u05d1\u05e5 GlobalUsings.cs<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nglobal using FirstWebApp;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d6\u05d4 \u05e7\u05d5\u05d1\u05e5 \u05d4-middleware \u05e9\u05e0\u05d5\u05e6\u05e8. \u05d0\u05e0\u05d7\u05e0\u05d5 \u05de\u05e7\u05d1\u05dc\u05d9\u05dd \u05d1-constructor \u05d0\u05ea \u05d4-middleware \u05d4\u05d1\u05d0 \u05e9\u05d0\u05de\u05d5\u05e8\u05d9\u05dd \u05dc\u05d4\u05e4\u05e2\u05d9\u05dc.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05e7\u05d5\u05d1\u05e5 CustomMiddleware.cs<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; highlight: [12,13,14]; title: ; notranslate\" title=\"\">\nusing Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Http;\nusing System.Threading.Tasks;\n\nnamespace FirstWebApp\n{\n    \/\/ You may need to install the Microsoft.AspNetCore.Http.Abstractions package into your project\n    public class CustomMiddleware\n    {\n        private readonly RequestDelegate _next;\n\n        public CustomMiddleware(RequestDelegate next) {\n            _next = next;\n        }\n\n        public Task Invoke(HttpContext httpContext) {\n\n            return _next(httpContext);\n        }\n    }\n\n    \/\/ Extension method used to add the middleware to the HTTP request pipeline.\n    public static class CustomMiddlewareExtensions\n    {\n        public static IApplicationBuilder UseCustomMiddleware(this IApplicationBuilder builder) {\n            return builder.UseMiddleware&lt;CustomMiddleware&gt;();\n        }\n    }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d5\u05de\u05d4 \u05e9\u05d9\u05e4\u05e2\u05dc \u05e2\u05d1\u05d5\u05e8 \u05db\u05dc \u05d1\u05e7\u05e9\u05d4 \u05d6\u05d0\u05ea \u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d4 invoke. \u05db\u05e8\u05d2\u05e2 \u05d4\u05d9\u05d0 \u05e8\u05e7 \u05e7\u05d5\u05e8\u05d0\u05ea \u05dc-middleware \u05d4\u05d1\u05d0 \u05d0\u05d1\u05dc \u05d9\u05e9 \u05dc\u05d9 \u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic Task Invoke(HttpContext httpContext) {\n    return _next(httpContext);\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05e0\u05d5\u05e1\u05d9\u05e3 \u05e4\u05e2\u05d5\u05dc\u05d4 \u05dc\u05e4\u05e0\u05d9 \u05d5\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e7\u05e8\u05d9\u05d0\u05d4 \u05d4\u05d1\u05d0\u05d4:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic async Task Invoke(HttpContext httpContext) {\n    await httpContext.Response.WriteAsync(&quot;Text from CustomMiddleware start &quot;);\n    await _next(httpContext);\n    await httpContext.Response.WriteAsync(&quot;Text from CustomMiddleware end &quot;);\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d5\u05e0\u05e7\u05d1\u05dc \u05d0\u05ea \u05d4\u05ea\u05d5\u05e6\u05d0\u05d4 \u05d4\u05d6\u05d0\u05ea:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware-2-1024x64.jpg\" alt=\"\" class=\"wp-image-1114\" style=\"width:724px;height:45px\" width=\"724\" height=\"45\" srcset=\"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware-2-1024x64.jpg 1024w, https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware-2-300x19.jpg 300w, https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware-2-768x48.jpg 768w, https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware-2.jpg 1096w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d1\u05e8\u05d5\u05e8 \u05e9\u05d9\u05e9 \u05d7\u05e9\u05d9\u05d1\u05d5\u05ea \u05dc\u05e1\u05d3\u05e8 \u05e9\u05d1\u05d5 \u05d0\u05e0\u05d7\u05e0\u05d5 \u05e7\u05d5\u05e8\u05d0\u05d9\u05dd \u05dc-middlewares.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Custom header with Middleware<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u05e0\u05e8\u05d0\u05d4 \u05d3\u05d5\u05d2\u05de\u05d0 \u05e9\u05dc \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-middleware \u05db\u05d3\u05d9 \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05ea \u05e0-header \u05e9\u05dc \u05d4\u05d3\u05e3. \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d0\u05e0\u05d9 \u05e8\u05d5\u05e6\u05d4 \u05dc\u05db\u05dc \u05d1\u05e7\u05e9\u05d4 \u05d7\u05d5\u05d6\u05e8\u05ea \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05ea\u05d5\u05db\u05df \u05dc-header.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; highlight: [10]; title: ; notranslate\" title=\"\">\npublic class CustomMiddleware\n{\n    private readonly RequestDelegate _next;\n\n    public CustomMiddleware(RequestDelegate next) {\n        _next = next;\n    }\n\n    public async Task Invoke(HttpContext httpContext) {\n        httpContext.Response.Headers.Add(&quot;TestHeaserKey&quot;, DateTime.Now.ToLongTimeString());\n        await httpContext.Response.WriteAsync(&quot;Text from CustomMiddleware start &quot;);\n        await _next(httpContext);\n        await httpContext.Response.WriteAsync(&quot;Text from CustomMiddleware end &quot;);\n    }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05dc\u05db\u05dc \u05d3\u05e3 \u05e9\u05d9\u05e2\u05dc\u05d4 \u05e2\u05db\u05e9\u05d9\u05d5 \u05d9\u05ea\u05d5\u05d5\u05e1\u05e3 \u05d4-header \u05e9\u05d4\u05d5\u05e1\u05e4\u05e0\u05d5.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05db\u05de\u05d5 \u05e9\u05d4\u05d5\u05e1\u05e4\u05e0\u05d5 header \u05d0\u05e4\u05e9\u05e8 \u05d2\u05dd \u05dc\u05d4\u05e1\u05d9\u05e8 \u05dc\u05d0 \u05e8\u05e6\u05d5\u05d9\u05d9\u05dd.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic Task Invoke(HttpContext httpContext) {\n    var headersToRemove = new string&#x5B;] { &quot;Powered-by&quot;, &quot;hosting-server&quot; };\n    foreach (var headerkey in headersToRemove) {\n        httpContext.Response.Headers.Remove(headerkey);\n    }\n    return _next(httpContext);\n}\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>\u05d4\u05de\u05e9\u05da \u05d4\u05ea\u05d5\u05db\u05e0\u05d9\u05ea \u05de\u05de\u05d0\u05de\u05e8 \u05d4\u05d4\u05e7\u05d3\u05de\u05d4. \u05d4\u05d5\u05e4\u05e0\u05e7\u05e6\u05d9\u05d4 Run \u05e0\u05db\u05e0\u05e1\u05ea \u05dc\u05de\u05e9\u05e4\u05d7\u05ea \u05d4-Middlewares. \u05db\u05dc \u05d1\u05e7\u05e9\u05d4 \u05e9\u05de\u05d2\u05d9\u05e2\u05d4 \u05dc\u05e9\u05e8\u05ea \u05e0\u05db\u05e0\u05e1\u05ea \u05d3\u05e8\u05da Middlewares \u05e9\u05d4\u05ea\u05e4\u05e7\u05d9\u05d3 \u05e9\u05dc\u05d4\u05dd \u05dc\u05d1\u05e6\u05e2 \u05e4\u05e2\u05d5\u05dc\u05d5\u05ea \u05e2\u05dc \u05d4\u05d1\u05e7\u05e9\u05d4. \u05db\u05dc \u05d0\u05d7\u05d3 \u05de\u05d1\u05e6\u05e2 \u05e4\u05e2\u05d5\u05dc\u05d4 \u05d5\u05d0\u05d6 \u05e0\u05e7\u05e8\u05d0 \u05d4-Middleware \u05d4\u05d1\u05d0. \u05dc\u05de\u05e9\u05dc, \u05d0\u05dd \u05d0\u05e0\u05d9 \u05e8\u05d5\u05e6\u05d4 \u05e9\u05d9\u05d4\u05d9\u05d4 \u05dc\u05d9 \u05dc\u05d5\u05d2 \u05db\u05e0\u05d9\u05e1\u05d4 \u05d5\u05d9\u05e6\u05d9\u05d0\u05d4 \u05e9\u05dc \u05d1\u05e7\u05e9\u05d4 \u05e9\u05de\u05d2\u05d9\u05e2\u05d4 \u05d0\u05e4\u05e9\u05e8 \u05dc\u05d1\u05e0\u05d5\u05ea Middleware \u05e9\u05d9\u05db\u05ea\u05d5\u05d1 \u05dc\u05dc\u05d5\u05d2 \u05d1\u05db\u05e0\u05d9\u05e1\u05d4 \u05d5\u05d1\u05d9\u05e6\u05d9\u05d0\u05d4. \u05d5\u05d0\u05d6 \u05d0\u05e4\u05e9\u05e8 \u05d2\u05dd \u05dc\u05d3\u05e2\u05ea \u05db\u05de\u05d4 \u05d6\u05de\u05df [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[27,28],"tags":[],"class_list":["post-1072","post","type-post","status-publish","format-standard","hentry","category-asp-net","category-dot-net-basics","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Middlewares - Code Notebook<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/\" \/>\n<meta property=\"og:locale\" content=\"he_IL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Middlewares - Code Notebook\" \/>\n<meta property=\"og:description\" content=\"\u05d4\u05de\u05e9\u05da \u05d4\u05ea\u05d5\u05db\u05e0\u05d9\u05ea \u05de\u05de\u05d0\u05de\u05e8 \u05d4\u05d4\u05e7\u05d3\u05de\u05d4. \u05d4\u05d5\u05e4\u05e0\u05e7\u05e6\u05d9\u05d4 Run \u05e0\u05db\u05e0\u05e1\u05ea \u05dc\u05de\u05e9\u05e4\u05d7\u05ea \u05d4-Middlewares. \u05db\u05dc \u05d1\u05e7\u05e9\u05d4 \u05e9\u05de\u05d2\u05d9\u05e2\u05d4 \u05dc\u05e9\u05e8\u05ea \u05e0\u05db\u05e0\u05e1\u05ea \u05d3\u05e8\u05da Middlewares \u05e9\u05d4\u05ea\u05e4\u05e7\u05d9\u05d3 \u05e9\u05dc\u05d4\u05dd \u05dc\u05d1\u05e6\u05e2 \u05e4\u05e2\u05d5\u05dc\u05d5\u05ea \u05e2\u05dc \u05d4\u05d1\u05e7\u05e9\u05d4. \u05db\u05dc \u05d0\u05d7\u05d3 \u05de\u05d1\u05e6\u05e2 \u05e4\u05e2\u05d5\u05dc\u05d4 \u05d5\u05d0\u05d6 \u05e0\u05e7\u05e8\u05d0 \u05d4-Middleware \u05d4\u05d1\u05d0. \u05dc\u05de\u05e9\u05dc, \u05d0\u05dd \u05d0\u05e0\u05d9 \u05e8\u05d5\u05e6\u05d4 \u05e9\u05d9\u05d4\u05d9\u05d4 \u05dc\u05d9 \u05dc\u05d5\u05d2 \u05db\u05e0\u05d9\u05e1\u05d4 \u05d5\u05d9\u05e6\u05d9\u05d0\u05d4 \u05e9\u05dc \u05d1\u05e7\u05e9\u05d4 \u05e9\u05de\u05d2\u05d9\u05e2\u05d4 \u05d0\u05e4\u05e9\u05e8 \u05dc\u05d1\u05e0\u05d5\u05ea Middleware \u05e9\u05d9\u05db\u05ea\u05d5\u05d1 \u05dc\u05dc\u05d5\u05d2 \u05d1\u05db\u05e0\u05d9\u05e1\u05d4 \u05d5\u05d1\u05d9\u05e6\u05d9\u05d0\u05d4. \u05d5\u05d0\u05d6 \u05d0\u05e4\u05e9\u05e8 \u05d2\u05dd \u05dc\u05d3\u05e2\u05ea \u05db\u05de\u05d4 \u05d6\u05de\u05df [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/\" \/>\n<meta property=\"og:site_name\" content=\"Code Notebook\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-13T15:46:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-14T05:17:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware.jpg\" \/>\n<meta name=\"author\" content=\"kerendanino\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u05e0\u05db\u05ea\u05d1 \u05e2\u05dc \u05d9\u05d3\" \/>\n\t<meta name=\"twitter:data1\" content=\"kerendanino\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u05d6\u05de\u05df \u05e7\u05e8\u05d9\u05d0\u05d4 \u05de\u05d5\u05e2\u05e8\u05da\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u05d3\u05e7\u05d5\u05ea\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/\"},\"author\":{\"name\":\"kerendanino\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#\\\/schema\\\/person\\\/195dfc625818eadda7903d456890e24c\"},\"headline\":\"Middlewares\",\"datePublished\":\"2023-09-13T15:46:24+00:00\",\"dateModified\":\"2023-09-14T05:17:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/\"},\"wordCount\":98,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/dotnet-middleware.jpg\",\"articleSection\":[\"ASP.NET\",\"Asp.net core Basics\"],\"inLanguage\":\"he-IL\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/\",\"name\":\"Middlewares - Code Notebook\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/dotnet-middleware.jpg\",\"datePublished\":\"2023-09-13T15:46:24+00:00\",\"dateModified\":\"2023-09-14T05:17:30+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/#breadcrumb\"},\"inLanguage\":\"he-IL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"he-IL\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/#primaryimage\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/dotnet-middleware.jpg\",\"contentUrl\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/dotnet-middleware.jpg\",\"width\":521,\"height\":81},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/middlewares\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Middlewares\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#website\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/\",\"name\":\"Code Notebook\",\"description\":\"Easy coding\",\"publisher\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"he-IL\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#organization\",\"name\":\"Code Notebook\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"he-IL\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo-epic-marketing-05.png\",\"contentUrl\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo-epic-marketing-05.png\",\"width\":3626,\"height\":1942,\"caption\":\"Code Notebook\"},\"image\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#\\\/schema\\\/person\\\/195dfc625818eadda7903d456890e24c\",\"name\":\"kerendanino\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"he-IL\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g\",\"caption\":\"kerendanino\"},\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/author\\\/kerendanino\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Middlewares - Code Notebook","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/","og_locale":"he_IL","og_type":"article","og_title":"Middlewares - Code Notebook","og_description":"\u05d4\u05de\u05e9\u05da \u05d4\u05ea\u05d5\u05db\u05e0\u05d9\u05ea \u05de\u05de\u05d0\u05de\u05e8 \u05d4\u05d4\u05e7\u05d3\u05de\u05d4. \u05d4\u05d5\u05e4\u05e0\u05e7\u05e6\u05d9\u05d4 Run \u05e0\u05db\u05e0\u05e1\u05ea \u05dc\u05de\u05e9\u05e4\u05d7\u05ea \u05d4-Middlewares. \u05db\u05dc \u05d1\u05e7\u05e9\u05d4 \u05e9\u05de\u05d2\u05d9\u05e2\u05d4 \u05dc\u05e9\u05e8\u05ea \u05e0\u05db\u05e0\u05e1\u05ea \u05d3\u05e8\u05da Middlewares \u05e9\u05d4\u05ea\u05e4\u05e7\u05d9\u05d3 \u05e9\u05dc\u05d4\u05dd \u05dc\u05d1\u05e6\u05e2 \u05e4\u05e2\u05d5\u05dc\u05d5\u05ea \u05e2\u05dc \u05d4\u05d1\u05e7\u05e9\u05d4. \u05db\u05dc \u05d0\u05d7\u05d3 \u05de\u05d1\u05e6\u05e2 \u05e4\u05e2\u05d5\u05dc\u05d4 \u05d5\u05d0\u05d6 \u05e0\u05e7\u05e8\u05d0 \u05d4-Middleware \u05d4\u05d1\u05d0. \u05dc\u05de\u05e9\u05dc, \u05d0\u05dd \u05d0\u05e0\u05d9 \u05e8\u05d5\u05e6\u05d4 \u05e9\u05d9\u05d4\u05d9\u05d4 \u05dc\u05d9 \u05dc\u05d5\u05d2 \u05db\u05e0\u05d9\u05e1\u05d4 \u05d5\u05d9\u05e6\u05d9\u05d0\u05d4 \u05e9\u05dc \u05d1\u05e7\u05e9\u05d4 \u05e9\u05de\u05d2\u05d9\u05e2\u05d4 \u05d0\u05e4\u05e9\u05e8 \u05dc\u05d1\u05e0\u05d5\u05ea Middleware \u05e9\u05d9\u05db\u05ea\u05d5\u05d1 \u05dc\u05dc\u05d5\u05d2 \u05d1\u05db\u05e0\u05d9\u05e1\u05d4 \u05d5\u05d1\u05d9\u05e6\u05d9\u05d0\u05d4. \u05d5\u05d0\u05d6 \u05d0\u05e4\u05e9\u05e8 \u05d2\u05dd \u05dc\u05d3\u05e2\u05ea \u05db\u05de\u05d4 \u05d6\u05de\u05df [&hellip;]","og_url":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/","og_site_name":"Code Notebook","article_published_time":"2023-09-13T15:46:24+00:00","article_modified_time":"2023-09-14T05:17:30+00:00","og_image":[{"url":"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware.jpg","type":"","width":"","height":""}],"author":"kerendanino","twitter_card":"summary_large_image","twitter_misc":{"\u05e0\u05db\u05ea\u05d1 \u05e2\u05dc \u05d9\u05d3":"kerendanino","\u05d6\u05de\u05df \u05e7\u05e8\u05d9\u05d0\u05d4 \u05de\u05d5\u05e2\u05e8\u05da":"2 \u05d3\u05e7\u05d5\u05ea"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/#article","isPartOf":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/"},"author":{"name":"kerendanino","@id":"https:\/\/epicmarketing.co.il\/notebook\/#\/schema\/person\/195dfc625818eadda7903d456890e24c"},"headline":"Middlewares","datePublished":"2023-09-13T15:46:24+00:00","dateModified":"2023-09-14T05:17:30+00:00","mainEntityOfPage":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/"},"wordCount":98,"commentCount":1,"publisher":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/#organization"},"image":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/#primaryimage"},"thumbnailUrl":"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware.jpg","articleSection":["ASP.NET","Asp.net core Basics"],"inLanguage":"he-IL","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/epicmarketing.co.il\/notebook\/middlewares\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/","url":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/","name":"Middlewares - Code Notebook","isPartOf":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/#website"},"primaryImageOfPage":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/#primaryimage"},"image":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/#primaryimage"},"thumbnailUrl":"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware.jpg","datePublished":"2023-09-13T15:46:24+00:00","dateModified":"2023-09-14T05:17:30+00:00","breadcrumb":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/#breadcrumb"},"inLanguage":"he-IL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/epicmarketing.co.il\/notebook\/middlewares\/"]}]},{"@type":"ImageObject","inLanguage":"he-IL","@id":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/#primaryimage","url":"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware.jpg","contentUrl":"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/09\/dotnet-middleware.jpg","width":521,"height":81},{"@type":"BreadcrumbList","@id":"https:\/\/epicmarketing.co.il\/notebook\/middlewares\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/epicmarketing.co.il\/notebook\/"},{"@type":"ListItem","position":2,"name":"Middlewares"}]},{"@type":"WebSite","@id":"https:\/\/epicmarketing.co.il\/notebook\/#website","url":"https:\/\/epicmarketing.co.il\/notebook\/","name":"Code Notebook","description":"Easy coding","publisher":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/epicmarketing.co.il\/notebook\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"he-IL"},{"@type":"Organization","@id":"https:\/\/epicmarketing.co.il\/notebook\/#organization","name":"Code Notebook","url":"https:\/\/epicmarketing.co.il\/notebook\/","logo":{"@type":"ImageObject","inLanguage":"he-IL","@id":"https:\/\/epicmarketing.co.il\/notebook\/#\/schema\/logo\/image\/","url":"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/07\/logo-epic-marketing-05.png","contentUrl":"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/07\/logo-epic-marketing-05.png","width":3626,"height":1942,"caption":"Code Notebook"},"image":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/epicmarketing.co.il\/notebook\/#\/schema\/person\/195dfc625818eadda7903d456890e24c","name":"kerendanino","image":{"@type":"ImageObject","inLanguage":"he-IL","@id":"https:\/\/secure.gravatar.com\/avatar\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g","caption":"kerendanino"},"url":"https:\/\/epicmarketing.co.il\/notebook\/author\/kerendanino\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/posts\/1072","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/comments?post=1072"}],"version-history":[{"count":8,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/posts\/1072\/revisions"}],"predecessor-version":[{"id":1143,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/posts\/1072\/revisions\/1143"}],"wp:attachment":[{"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/media?parent=1072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/categories?post=1072"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/tags?post=1072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}