AutoImport - check local url fix

This commit is contained in:
Michał Zieliński
2023-08-30 23:11:40 +02:00
parent f90cb6a126
commit d3c50062e1
3 changed files with 4 additions and 2 deletions

View File

@@ -132,7 +132,7 @@ namespace WebAPI.Controllers
[AllowAnonymous]
public IActionResult AutoImport(string apiKey)
{
if (Request.Host.Value != "localhost:5400" || apiKey != configuration["apiKey"])
if (Request.Host.Value != configuration["api-local-url"] || apiKey != configuration["apiKey"])
{
return Unauthorized();
}
@@ -180,7 +180,7 @@ namespace WebAPI.Controllers
[AllowAnonymous]
public IActionResult autoImportMorska(string apiKey)
{
if (Request.Host.Value != "localhost:5401" || apiKey != configuration["apiKey"])
if (Request.Host.Value != configuration["api-local-url"] || apiKey != configuration["apiKey"])
{
return Unauthorized();
}

View File

@@ -15,6 +15,7 @@
"apiKey": "10763478CB738D4ecb2h76g803478CB738D4e",
"exportDirectory": "1eTyCUzYbzVQB8f8sbNmvnebFXyW2-axt",
"appLogsFile": "1RL-qtl0THgBUWcEWWqc0nCaVY7c8RRfXk6uhsqczuVA",
"apiLocalUrl": "localhost:5401",
"Kestrel": {
"Endpoints": {
"Http": {

View File

@@ -15,6 +15,7 @@
"apiKey": "#{api-key}#",
"exportDirectory": "#{export-directory}#",
"appLogsFile": "#{app-logs-file}#",
"apiLocalUrl": "#{api-local-url}#",
"Kestrel": {
"Endpoints": {
"Http": {