Remove host checking in auto import
This commit is contained in:
@@ -283,7 +283,7 @@ public class LayersController : Controller
|
|||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public IActionResult AutoImport(string apiKey, string nameFilter)
|
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);
|
_logger.LogWarning("AutoImport: Unauthorized request with apiKey {ApiKey}", apiKey);
|
||||||
return Unauthorized();
|
return Unauthorized();
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ GET http://localhost:5400/tests/ping
|
|||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
GET https://morska.diunabi.com/api/tests/ping
|
GET https://morska.diunabi.com/api/layers/autoImport/godojshf8704i357yhgdsahjdfh/K5-
|
||||||
Reference in New Issue
Block a user