﻿
{"id":15426,"date":"2020-04-24T08:50:41","date_gmt":"2020-04-24T08:50:41","guid":{"rendered":"https:\/\/www.gencayyildiz.com\/blog\/?p=15426"},"modified":"2020-04-24T08:51:14","modified_gmt":"2020-04-24T08:51:14","slug":"asp-net-core-api-icin-guvenli-client-ip-listesi","status":"publish","type":"post","link":"https:\/\/www.gencayyildiz.com\/blog\/asp-net-core-api-icin-guvenli-client-ip-listesi\/","title":{"rendered":"Asp.NET Core API \u0130\u00e7in G\u00fcvenli Client IP Listesi"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p>Merhaba,<\/p>\n<p>Da\u011f\u0131t\u0131k platformlar i\u00e7in tercih edilen Asp.NET Core API uygulamalar\u0131na herhangi bir kontrol yap\u0131lmad\u0131\u011f\u0131 taktirde herhangi bir IP&#8217;den istek g\u00f6nderilerek client olunabilmektedir. Bizler b\u00f6yle bir durumda IP seviyesinde kontrol uygulayarak iznimizin d\u0131\u015f\u0131ndaki clientlar\u0131n eri\u015fimini engelleyebilir ve b\u00f6ylece uygulaman\u0131n client ili\u015fkisini s\u0131n\u0131rl\u0131 tutarak g\u00fcvenli\u011fini desteklemi\u015f olabiliriz.<br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi.jpg\" alt=\"Asp.NET Core API \u0130\u00e7in G\u00fcvenli Client IP Listesi\" width=\"717\" height=\"287\" class=\"aligncenter size-full wp-image-15433\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi.jpg 717w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-300x120.jpg 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/a><br \/>\nAPI uygulamam\u0131za istek yapabilecek olan clientlar\u0131 iki ba\u015fl\u0131k alt\u0131nda tan\u0131mlayabiliriz.<\/p>\n<ul>\n<li><strong>\u0130zin verilenler(WhiteList)<\/strong><br \/>\nAPI&#8217;a sadece eri\u015fim izni olanlar\u0131n tan\u0131mland\u0131\u011f\u0131 listedir. Bu listede olmayan clientlar uygulamaya eri\u015ftirilmeyerek, ar\u0131nd\u0131r\u0131lmaktad\u0131r. T\u00fcmdengelimsel bir y\u00f6ntemdir.\n<\/li>\n<li><strong>\u0130zin verilmeyenler(BlackList)<\/strong><br \/>\nAPI&#8217;a sadece eri\u015fim izni olmayanlar\u0131n tan\u0131mland\u0131\u011f\u0131 listedir. Bu listede bulunan IP&#8217;ler d\u0131\u015f\u0131ndaki t\u00fcm clientlar uygulamaya eri\u015febilecektir. T\u00fcmevar\u0131msal bir y\u00f6ntemdir.\n<\/li>\n<\/ul>\n<p>API uygulamalar\u0131nda, IP kontrol\u00fc genellikle uygulama seviyesinde olsada bazen controller seviyesinde de ger\u00e7ekle\u015ftirilmesi gerekmektedir. Burada yap\u0131sal olarak benimsenecek stratejiyi ihtiya\u00e7lar belirlemektedir lakin teknik olarak uygulama bazl\u0131 ya da controller bazl\u0131 olmas\u0131 de\u011fi\u015fkenlik g\u00f6stermektedir. E\u011fer ki uygulama bazl\u0131 bir IP kontrol\u00fc ger\u00e7ekle\u015ftirilecekse bunun i\u00e7in en do\u011fru y\u00f6ntem bir <a href=\"https:\/\/www.gencayyildiz.com\/blog\/asp-net-core-2de-middleware-yapisi-ve-kullanimi\/\" rel=\"noopener noreferrer\" target=\"_blank\">Middleware<\/a> yazmak olacakt\u0131r. Yok e\u011fer controller bazl\u0131 kontrol ger\u00e7ekle\u015ftirilecekse bir &#8216;ActionFilter&#8217; yaz\u0131lmas\u0131 gerekecektir. \u0130\u00e7eri\u011fimizde her iki y\u00f6ntemide inceleyece\u011fiz. Gelin ilk olarak uygulama bazl\u0131 IP kontrol\u00fcn\u00fcn in\u015fas\u0131n\u0131 ele alarak ba\u015flayal\u0131m.<\/p>\n<h3>Asp.NET Core Uygulama Bazl\u0131 IP Kontrol<\/h3>\n<p>\u00d6ncelik olarak whitelist ya da blacklist&#8217;i belirleyerek ba\u015flayal\u0131m. Bunun i\u00e7in &#8216;appsettings.json&#8217; dosyas\u0131n\u0131 kullanabiliriz.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n{\r\n  &quot;WhiteList&quot;: &#x5B;\r\n    &quot;127.0.0.1&quot;,\r\n    &quot;::1&quot;\r\n  ],\r\n  &quot;Logging&quot;: {\r\n    &quot;LogLevel&quot;: {\r\n      &quot;Default&quot;: &quot;Information&quot;,\r\n      &quot;Microsoft&quot;: &quot;Warning&quot;,\r\n      &quot;Microsoft.Hosting.Lifetime&quot;: &quot;Information&quot;\r\n    }\r\n  },\r\n  &quot;AllowedHosts&quot;: &quot;*&quot;\r\n}\r\n<\/pre>\n<p>G\u00f6r\u00fcld\u00fc\u011f\u00fc \u00fczere yukar\u0131daki kod blo\u011funda &#8216;WhiteList&#8217; tan\u0131mlanm\u0131\u015ft\u0131r. &#8216;<em>Hoca, blacklist nerede?<\/em>&#8216; \u015feklindeki sorunuzu duyar gibiyim&#8230; Bir uygulamada sadece birinin tan\u0131mlanmas\u0131 yeterli olacakt\u0131r. Bu i\u00e7eri\u011fimizde \u00f6rnek olarak whitelist \u00fczerinde IP kontrol\u00fc yapaca\u011f\u0131z. Blacklist buradakinin tam tersi bir mant\u0131kta kullan\u0131lmas\u0131 gerekecektir. Bunu sizlere b\u0131rak\u0131yorum&#8230;<\/p>\n<p>\u015eimdi istek yapan client&#8217;\u0131n IP de\u011ferini tan\u0131mlad\u0131\u011f\u0131m\u0131z whitelist&#8217;te olup olmad\u0131\u011f\u0131n\u0131 kontrol eden middleware&#8217;i olu\u015ftural\u0131m.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class IPControlMiddleware\r\n    {\r\n        readonly RequestDelegate _next;\r\n        IConfiguration _configuration;\r\n        public IPControlMiddleware(RequestDelegate next, IConfiguration configuration)\r\n        {\r\n            _configuration = configuration;\r\n            _next = next;\r\n        }\r\n        public async Task Invoke(HttpContext context)\r\n        {\r\n            \/\/Client'\u0131n IP adresini al\u0131yoruz.\r\n            IPAddress remoteIp = context.Connection.RemoteIpAddress;\r\n            \/\/Whitelist'te ki t\u00fcm IP'leri \u00e7ekiyoruz.\r\n            var ips = _configuration.GetSection(&quot;WhiteList&quot;).AsEnumerable().Where(ip =&gt; !string.IsNullOrEmpty(ip.Value)).Select(ip =&gt; ip.Value).ToList();\r\n\r\n            \/\/Client IP, whitelist'te var m\u0131 kontrol ediyoruz.\r\n            if (!ips.Where(ip =&gt; IPAddress.Parse(ip).Equals(remoteIp)).Any())\r\n            {\r\n                \/\/E\u011fer yoksa 403 hatas\u0131 veriyoruz.\r\n                context.Response.StatusCode = (int)HttpStatusCode.Forbidden;\r\n                await context.Response.WriteAsync(&quot;Bu IP'nin eri\u015fim yetkisi yoktur.&quot;);\r\n                return;\r\n            }\r\n\r\n            await _next.Invoke(context);\r\n        }\r\n    }\r\n<\/pre>\n<p>Ard\u0131ndan ilgili middleware&#8217;i &#8216;Startup.cs&#8217; dosyas\u0131ndaki &#8216;Configure&#8217; metodunda \u00e7a\u011f\u0131ral\u0131m.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class Startup\r\n    {\r\n        .\r\n        .\r\n        .\r\n        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\r\n        {\r\n            .\r\n            .\r\n            .\r\n            app.UseMiddleware&lt;IPControlMiddleware&gt;();\r\n            .\r\n            .\r\n            .\r\n        }\r\n    }\r\n<\/pre>\n<p>\u015eimdide olu\u015fturdu\u011fumuz yap\u0131lanmay\u0131 Postman ile test edelim.<\/p>\n<table>\n<thead>\n<tr>\n<th>Ge\u00e7erli IP<\/th>\n<th>Ge\u00e7ersiz IP<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-2.jpg\" alt=\"Asp.NET Core API \u0130\u00e7in G\u00fcvenli Client IP Listesi\" width=\"616\" height=\"459\" class=\"aligncenter size-full wp-image-15444\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-2.jpg 616w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-2-300x224.jpg 300w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/a><\/td>\n<td><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-1.jpg\" alt=\"Asp.NET Core API \u0130\u00e7in G\u00fcvenli Client IP Listesi\" width=\"813\" height=\"361\" class=\"aligncenter size-full wp-image-15443\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-1.jpg 813w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-1-300x133.jpg 300w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-1-768x341.jpg 768w\" sizes=\"auto, (max-width: 813px) 100vw, 813px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>G\u00f6r\u00fcld\u00fc\u011f\u00fc \u00fczere uygulama bazl\u0131 IP kontrol\u00fcm\u00fcz\u00fc ba\u015far\u0131yla ger\u00e7ekle\u015ftirmi\u015f bulunmaktay\u0131z. \u015eimdi gelin s\u0131radaki controller bazl\u0131 IP kontrol\u00fcn\u00fcn nas\u0131l yap\u0131ld\u0131\u011f\u0131n\u0131 inceleyelim.<\/p>\n<h3>Asp.NET Core Controller ya da Action Bazl\u0131 IP Kontrol<\/h3>\n<p>Controller bazl\u0131 IP kontrol yapabilmek i\u00e7in gelen istek ile controller ya da action aras\u0131na kontrol ama\u00e7l\u0131 girilmesi gerekmektedir. Bunun i\u00e7in Asp.NET Core&#8217;da &#8216;ActionFilterAttribute&#8217;tan t\u00fcreyen filtreler geli\u015ftirilmi\u015ftir. Bir request esnas\u0131nda controllerdan ya da actiondan \u00f6nce varsa tan\u0131mlanm\u0131\u015f filtre tetiklenir ve b\u00f6ylece ilgili request&#8217;e dair bilgiler ve \u00e7al\u0131\u015fmalar yap\u0131labilir. Yani uzun s\u00f6z\u00fcn k\u0131sas\u0131, istek yerini bulmadan bizlere i\u015flem zaman\u0131 kazand\u0131ran yap\u0131lar filtrelerdir diyebiliriz.<\/p>\n<p>\u015eimdi gelin ilk olarak &#8216;ActionFilterAttribute&#8217; olu\u015ftural\u0131m.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class IpControlAttribute : ActionFilterAttribute\r\n    {\r\n        IConfiguration _configuration;\r\n        public IpControlAttribute(IConfiguration configuration)\r\n        {\r\n            _configuration = configuration;\r\n        }\r\n        public override void OnActionExecuting(ActionExecutingContext context)\r\n        {\r\n            \/\/Client'\u0131n IP adresini al\u0131yoruz.\r\n            IPAddress remoteIp = context.HttpContext.Connection.RemoteIpAddress;\r\n            \/\/Whitelist'te ki t\u00fcm IP'leri \u00e7ekiyoruz.\r\n            var ips = _configuration.GetSection(&quot;WhiteList&quot;).AsEnumerable().Where(ip =&gt; !string.IsNullOrEmpty(ip.Value)).Select(ip =&gt; ip.Value).ToList();\r\n\r\n            \/\/Client IP, whitelist'te var m\u0131 kontrol ediyoruz.\r\n            if (!ips.Where(ip =&gt; IPAddress.Parse(ip).Equals(remoteIp)).Any())\r\n            {\r\n                \/\/E\u011fer yoksa 403 hatas\u0131 veriyoruz.\r\n                context.Result = new StatusCodeResult((int)HttpStatusCode.Forbidden);\r\n                return;\r\n            }\r\n            base.OnActionExecuting(context);\r\n        }\r\n    }\r\n<\/pre>\n<p>Olu\u015fturdu\u011fumuz bu filtre ile controller ya da actionlar\u0131 i\u015faretleyerek IP kontrol\u00fc yapmak istedi\u011fimiz skalay\u0131 belirleyebiliriz. Tabi \u00f6ncelikle bu filtreyi servis olarak uygulamaya eklememiz gerekmektedir.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class Startup\r\n    {\r\n        public void ConfigureServices(IServiceCollection services)\r\n        {\r\n            .\r\n            .\r\n            .\r\n            services.AddScoped&lt;IpControlAttribute&gt;();\r\n            .\r\n            .\r\n            .\r\n        }\r\n        .\r\n        .\r\n        .\r\n    }\r\n<\/pre>\n<p><strong>La hoca! Attributelar direkt olarak kullan\u0131labilir! Ne diye servis olarak ekliyorsun?<\/strong> dedi\u011finizide duyar gibiyim. Evet, normalde attributelar olu\u015fturulduklar\u0131 yap\u0131lar \u00fczerinde direkt kullan\u0131labilir \u00f6zelliktedirler. Lakin bizim olu\u015fturdu\u011fumuz &#8216;IpControlAttribute&#8217;a bakarsan\u0131z e\u011fer constructor&#8217;dan bir parametre alarak dependency injection ile ICollection nesnesi talep etmektedir. Normalde bu attribute&#8217;u \u00e7a\u011f\u0131rd\u0131\u011f\u0131m\u0131zda bu constructor&#8217;a bu de\u011feri bizim g\u00f6ndermemiz gerekmektedir. Aksi taktirde;<br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-3.jpg\" alt=\"Asp.NET Core API \u0130\u00e7in G\u00fcvenli Client IP Listesi\" width=\"489\" height=\"256\" class=\"aligncenter size-full wp-image-15450\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-3.jpg 489w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-3-300x157.jpg 300w\" sizes=\"auto, (max-width: 489px) 100vw, 489px\" \/><\/a><br \/>\n\u015feklinde bir hata al\u0131nacakt\u0131r. Dolay\u0131s\u0131yla bu de\u011ferin DI provider&#8217;\u0131ndan gidebilmesi i\u00e7in stratejik olarak bu attribute&#8217;u servis olarak ekleyecek ve &#8216;ServiceFilter&#8217; olarak kullanaca\u011f\u0131z. <\/p>\n<p>Velhas\u0131l kullan\u0131m\u0131na gelirsek e\u011fer;<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    &#x5B;ApiController]\r\n    &#x5B;Route(&quot;api\/&#x5B;controller]&quot;)]\r\n    public class ProductsController : ControllerBase\r\n    {\r\n        &#x5B;HttpGet(&quot;&#x5B;action]&quot;)]\r\n        &#x5B;ServiceFilter(typeof(IpControlAttribute))]\r\n        public IEnumerable&lt;string&gt; GetProducts()\r\n        {\r\n            return new List&lt;string&gt;\r\n            {\r\n                 &quot;pen&quot;,\r\n                 &quot;mouse&quot;,\r\n                 &quot;keyboard&quot;\r\n            };\r\n        }\r\n\r\n        &#x5B;HttpGet(&quot;&#x5B;action]&quot;)]\r\n        public string GetProduct()\r\n        {\r\n            return &quot;pen&quot;;\r\n        }\r\n    }\r\n<\/pre>\n<p>\u015feklinde action bazl\u0131 bir kullan\u0131m tercih edebilirsiniz. Burada &#8216;GetProducts&#8217; IP kontrol\u00fcne tabi tutulurken, &#8216;GetProduct&#8217; ise herhangi bir kontrol olmaks\u0131z\u0131n t\u00fcm IP&#8217;ler taraf\u0131ndan tetiklenebilecektir. E\u011fer ki t\u00fcm actionlar\u0131n IP kontrol\u00fc yapmas\u0131 icap ederse, ister t\u00fcm actionlar <code style=\"color:red;\"><strong>[ServiceFilter(typeof(IpControlAttribute))]<\/strong><\/code> attribute&#8217;u ile i\u015faretlenebilece\u011fi gibi ister a\u015fa\u011f\u0131daki gibi sadece controller ilgili attribute ile i\u015faretlenebilir. Burada tercih siz de\u011ferli coderlara kalmaktad\u0131r \ud83d\ude42<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    &#x5B;ApiController]\r\n    &#x5B;Route(&quot;api\/&#x5B;controller]&quot;)]\r\n    &#x5B;ServiceFilter(typeof(IpControlAttribute))]\r\n    public class ProductsController : ControllerBase\r\n    {\r\n        &#x5B;HttpGet(&quot;&#x5B;action]&quot;)]\r\n        public IEnumerable&lt;string&gt; GetProducts()\r\n        {\r\n            return new List&lt;string&gt;\r\n            {\r\n                 &quot;pen&quot;,\r\n                 &quot;mouse&quot;,\r\n                 &quot;keyboard&quot;\r\n            };\r\n        }\r\n\r\n        &#x5B;HttpGet(&quot;&#x5B;action]&quot;)]\r\n        public string GetProduct()\r\n        {\r\n            return &quot;pen&quot;;\r\n        }\r\n    }\r\n<\/pre>\n<p>Filtre yap\u0131lanmas\u0131n\u0131n da testini ger\u00e7ekle\u015ftirirsek e\u011fer;<\/p>\n<table>\n<thead>\n<tr>\n<th>Ge\u00e7erli IP<\/th>\n<th>Ge\u00e7ersiz IP<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-2.jpg\" alt=\"Asp.NET Core API \u0130\u00e7in G\u00fcvenli Client IP Listesi\" width=\"616\" height=\"459\" class=\"aligncenter size-full wp-image-15444\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-2.jpg 616w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-2-300x224.jpg 300w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/a><\/td>\n<td><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-4.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-4.jpg\" alt=\"Asp.NET Core API \u0130\u00e7in G\u00fcvenli Client IP Listesi\" width=\"813\" height=\"478\" class=\"aligncenter size-full wp-image-15457\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-4.jpg 813w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-4-300x176.jpg 300w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/04\/Asp.NET-Core-API-\u0130\u00e7in-G\u00fcvenli-Client-IP-Listesi-4-768x452.jpg 768w\" sizes=\"auto, (max-width: 813px) 100vw, 813px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>g\u00f6r\u00fcld\u00fc\u011f\u00fc \u00fczere ba\u015far\u0131yla IP kontrol\u00fc yap\u0131lmaktad\u0131r.<\/p>\n<p>\u0130lgilenenlerin faydalanmas\u0131 dile\u011fiyle&#8230;<br \/>\nSonraki yaz\u0131lar\u0131mda g\u00f6r\u00fc\u015fmek \u00fczere&#8230;<br \/>\n\u0130yi \u00e7al\u0131\u015fmalar&#8230;<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Merhaba, Da\u011f\u0131t\u0131k platformlar i\u00e7in tercih edilen Asp.NET Core API uygulamalar\u0131na herhangi bir kontrol yap\u0131lmad\u0131\u011f\u0131 taktirde herhangi bir IP&#8217;den istek g\u00f6nderilerek client olunabilmektedir. Bizler b\u00f6yle bir durumda IP seviyesinde kontrol uygulayarak iznimizin d\u0131\u015f\u0131ndaki clientlar\u0131n eri\u015fimini&#46;&#46;&#46;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":15433,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3102,2898,3103],"tags":[3466,3462,3463,3461,3465,3464],"class_list":["post-15426","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-net-core","category-asp-net-core-3-0","category-asp-net-core-3-1","tag-actionfilterattribute","tag-asp-net-core-api-blacklist","tag-asp-net-core-api-ip-control","tag-asp-net-core-api-whitelist","tag-blacklist","tag-whitelist"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/15426","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/comments?post=15426"}],"version-history":[{"count":29,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/15426\/revisions"}],"predecessor-version":[{"id":15460,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/15426\/revisions\/15460"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media\/15433"}],"wp:attachment":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media?parent=15426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/categories?post=15426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/tags?post=15426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}