admin管理员组

文章数量:1024592

I have a map application using leaflet.js that pulls the map markers from a php page. I want to not allow people to be able to see those coordinates, to prevent them from copying them and sharing with other people for free. My problem is no matter what i have come up with so far, it seems like any skilled user can pull the data from a browser's devtools and then copy my markers and use them as they wish. Here is what I have done so far:

  1. A user must be logged in for the markers to display on the php page
  2. A one time token is created on the map page that then calls to the php page, once the token is used it is trashed, so if a user tries to copy the link from the javascript fetch() the token will be expired and not display the markers. But in devtools, they would be able to see what was outputed on the php page and just cut and paste, etc.
  3. I also have encoded the php page output using base64 and a one time key. This is then decoded on the map page. However any user could look into the javascript on the map page to see the one time key and then cut and paste everything into their one script to decode it.

I am missing any other options to keep these map marker data from being shared? Is there a way to tell devtools, not show the output of a certain page? Excited to hear your thoughts. Thanks!

I have a map application using leaflet.js that pulls the map markers from a php page. I want to not allow people to be able to see those coordinates, to prevent them from copying them and sharing with other people for free. My problem is no matter what i have come up with so far, it seems like any skilled user can pull the data from a browser's devtools and then copy my markers and use them as they wish. Here is what I have done so far:

  1. A user must be logged in for the markers to display on the php page
  2. A one time token is created on the map page that then calls to the php page, once the token is used it is trashed, so if a user tries to copy the link from the javascript fetch() the token will be expired and not display the markers. But in devtools, they would be able to see what was outputed on the php page and just cut and paste, etc.
  3. I also have encoded the php page output using base64 and a one time key. This is then decoded on the map page. However any user could look into the javascript on the map page to see the one time key and then cut and paste everything into their one script to decode it.

I am missing any other options to keep these map marker data from being shared? Is there a way to tell devtools, not show the output of a certain page? Excited to hear your thoughts. Thanks!

本文标签: phpHow to not allow unauthorized access to json data for leaflet mapStack Overflow