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:
- A user must be logged in for the markers to display on the php page
- 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.
- 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:
- A user must be logged in for the markers to display on the php page
- 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.
- 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
版权声明:本文标题:php - How to not allow unauthorized access to json data for leaflet map - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745609925a2158944.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论