-
I have an instance of martin running on a Debian (v. 12 "bookworm") server:
If I set up an HTML page and reference a JSON style sheet and the JSON style sheet specifies "localhost" instead of the server name, i.e. "debian1", then I can, on the same Debian server in an instance of Firefox, view a rendered map using HTTPS. I cannot, however, access the page from another machine -- I get a CORS error. Moreover, if I alter the url value in the style sheet to the server name in place of "localhost", then I receive a CORS error in Firefox on the Debian server. Question: Is it possible to run nginx on a server in front of the martin tile server and be able to access the map HTML page via HTTPS from another server? Here are my notes: Steps to make nginx.conf work after downloading from GitHub at: Start up attempt 1) no changes to nginx.conf
Change 1
start up attempt 2) success on same server, but fail on remote server. Access Attempts 1:
Status of nginx configuration file:
martin_map_SSL_2.html portions:
JSON, martin_style_SSL_debian1.json, style:
martin_3.config:
martin server console:
Also, I have HOST defined as "debian1" in the console where the martin server is started:
If I change "localhost" to "debian1" for the url value in the JSON,
then in Firefox running on debian1 where I previously succeeded in viewing a rendered map, I get a CORS error: I tried with the JSON "url" set to "debian1" these two variations of /etc/hosts, and still I get a CORS error:
What am I missing or what configuration setting is awry? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Also, the version of the JavaScript & css is from:
|
Beta Was this translation helpful? Give feedback.
-
i think there are a few unrelated issues here:
|
Beta Was this translation helpful? Give feedback.
The problem I encountered, CORS errors, has been resolved. The problem was that my JSON style file specified a URL for the tiles to point directly to the martin server, when, it should have directed the inquiry through nginx using HTTPS.
I modified my JSON stylesheet for the HTTPS test to:
And when I now make an HTTPS call to the testing pag…