From e6b45637128c4c74b0f3ac5053efbcf51d9cc453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieli=C5=84ski?= Date: Wed, 19 Nov 2025 19:03:04 +0100 Subject: [PATCH] Remove host checking in auto import --- src/Backend/DiunaBI.API/Controllers/LayersController.cs | 2 +- src/Backend/RESTRequests/test.rest | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Backend/DiunaBI.API/Controllers/LayersController.cs b/src/Backend/DiunaBI.API/Controllers/LayersController.cs index 9ecbf88..182f3d2 100644 --- a/src/Backend/DiunaBI.API/Controllers/LayersController.cs +++ b/src/Backend/DiunaBI.API/Controllers/LayersController.cs @@ -283,7 +283,7 @@ public class LayersController : Controller [AllowAnonymous] public IActionResult AutoImport(string apiKey, string nameFilter) { - if (Request.Host.Value != _configuration["apiLocalUrl"] || apiKey != _configuration["apiKey"]) + if (apiKey != _configuration["apiKey"]) { _logger.LogWarning("AutoImport: Unauthorized request with apiKey {ApiKey}", apiKey); return Unauthorized(); diff --git a/src/Backend/RESTRequests/test.rest b/src/Backend/RESTRequests/test.rest index 83b3507..b3f3c54 100644 --- a/src/Backend/RESTRequests/test.rest +++ b/src/Backend/RESTRequests/test.rest @@ -2,4 +2,4 @@ GET http://localhost:5400/tests/ping ### -GET https://morska.diunabi.com/api/tests/ping \ No newline at end of file +GET https://morska.diunabi.com/api/layers/autoImport/godojshf8704i357yhgdsahjdfh/K5- \ No newline at end of file