From b1bbbc6ee14be3f2430d13c470a6cd622d5a5698 Mon Sep 17 00:00:00 2001 From: sasgis <> Date: Sat, 12 Dec 1970 12:00:00 +0000 Subject: [PATCH] update zmp --- _water/navionics.SonarChart.layer.zmp/GetUrlScript.txt | 5 +++-- _water/navionics.SonarChart.zmp/GetUrlScript.txt | 5 +++-- _water/navionics.layer.zmp/GetUrlScript.txt | 5 +++-- _water/navionics.zmp/GetUrlScript.txt | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/_water/navionics.SonarChart.layer.zmp/GetUrlScript.txt b/_water/navionics.SonarChart.layer.zmp/GetUrlScript.txt index 2e229080d..7332ef6b2 100644 --- a/_water/navionics.SonarChart.layer.zmp/GetUrlScript.txt +++ b/_water/navionics.SonarChart.layer.zmp/GetUrlScript.txt @@ -34,7 +34,7 @@ var VTimeStamp: AnsiString; VResponseCode: Cardinal; VResponseHeader, VResponseData: AnsiString; - VRequestUrl: AnsiString; + VRequestUrl, VRequestHeader: AnsiString; begin Result := ''; @@ -51,9 +51,10 @@ begin if (Result = '') and Assigned(Downloader) then begin VTimeStamp := IntToStr(GetUnixTime); VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; + VRequestHeader := 'Origin: https://webapiv2.navionics.com' + #13#10 + 'Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html'; VResponseHeader := ''; VResponseData := ''; - VResponseCode := Downloader.DoHttpRequest(VRequestUrl, '', '', VResponseHeader, VResponseData); + VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, '', VResponseHeader, VResponseData); if VResponseCode = 200 then begin Result := VResponseData; diff --git a/_water/navionics.SonarChart.zmp/GetUrlScript.txt b/_water/navionics.SonarChart.zmp/GetUrlScript.txt index 74900090f..01f39cb70 100644 --- a/_water/navionics.SonarChart.zmp/GetUrlScript.txt +++ b/_water/navionics.SonarChart.zmp/GetUrlScript.txt @@ -34,7 +34,7 @@ var VTimeStamp: AnsiString; VResponseCode: Cardinal; VResponseHeader, VResponseData: AnsiString; - VRequestUrl: AnsiString; + VRequestUrl, VRequestHeader: AnsiString; begin Result := ''; @@ -51,9 +51,10 @@ begin if (Result = '') and Assigned(Downloader) then begin VTimeStamp := IntToStr(GetUnixTime); VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; + VRequestHeader := 'Origin: https://webapiv2.navionics.com' + #13#10 + 'Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html'; VResponseHeader := ''; VResponseData := ''; - VResponseCode := Downloader.DoHttpRequest(VRequestUrl, '', '', VResponseHeader, VResponseData); + VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, '', VResponseHeader, VResponseData); if VResponseCode = 200 then begin Result := VResponseData; diff --git a/_water/navionics.layer.zmp/GetUrlScript.txt b/_water/navionics.layer.zmp/GetUrlScript.txt index 721ac01bf..f39b884ef 100644 --- a/_water/navionics.layer.zmp/GetUrlScript.txt +++ b/_water/navionics.layer.zmp/GetUrlScript.txt @@ -34,7 +34,7 @@ var VTimeStamp: AnsiString; VResponseCode: Cardinal; VResponseHeader, VResponseData: AnsiString; - VRequestUrl: AnsiString; + VRequestUrl, VRequestHeader: AnsiString; begin Result := ''; @@ -51,9 +51,10 @@ begin if (Result = '') and Assigned(Downloader) then begin VTimeStamp := IntToStr(GetUnixTime); VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; + VRequestHeader := 'Origin: https://webapiv2.navionics.com' + #13#10 + 'Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html'; VResponseHeader := ''; VResponseData := ''; - VResponseCode := Downloader.DoHttpRequest(VRequestUrl, '', '', VResponseHeader, VResponseData); + VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, '', VResponseHeader, VResponseData); if VResponseCode = 200 then begin Result := VResponseData; diff --git a/_water/navionics.zmp/GetUrlScript.txt b/_water/navionics.zmp/GetUrlScript.txt index 906ff6237..43c6b0f33 100644 --- a/_water/navionics.zmp/GetUrlScript.txt +++ b/_water/navionics.zmp/GetUrlScript.txt @@ -34,7 +34,7 @@ var VTimeStamp: AnsiString; VResponseCode: Cardinal; VResponseHeader, VResponseData: AnsiString; - VRequestUrl: AnsiString; + VRequestUrl, VRequestHeader: AnsiString; begin Result := ''; @@ -51,9 +51,10 @@ begin if (Result = '') and Assigned(Downloader) then begin VTimeStamp := IntToStr(GetUnixTime); VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; + VRequestHeader := 'Origin: https://webapiv2.navionics.com' + #13#10 + 'Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html'; VResponseHeader := ''; VResponseData := ''; - VResponseCode := Downloader.DoHttpRequest(VRequestUrl, '', '', VResponseHeader, VResponseData); + VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, '', VResponseHeader, VResponseData); if VResponseCode = 200 then begin Result := VResponseData;