Comments (12)
如果读取不到尽量给一个默认值,向前兼容。
from running_page.
-
參考
-
https://docs.mapbox.com/help/getting-started/access-tokens/#url-restrictions
-
https://docs.mapbox.com/accounts/guides/tokens/#url-restrictions
到 Account | Mapbox - Tokens 新增一個 token:
-
-
並參考
中的
Origin: https://changchiyou.github.io
設置URLs
-
push commit 更新 Mapbox token changchiyou@c33d7f5
-
手動執行 Run Data Sync Github Action:
-
(✅ 成功)shift+command+R 重整頁面 https://changchiyou.github.io/running_page/
-
(✅ 成功: 理應失敗,因為沒有從指定的 origin URL 發 request)curl
2.
中的 request:curl https://api.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2.json\?secure\&access_token\=pk.eyJ1IjoiY2hhbmdjaGl5b3UiLCJhIjoiY2x1cXd2MWRxMDExZzJqcXJyNTVjbnVwOSJ9.hOsDM-tbwwCAAsDHWHYkFQ
from running_page.
嗯,对
from running_page.
@yihong0618 我隨意問了下 ChatGPT https://chat.openai.com/share/1db41f61-a363-44fb-a63a-a5701e922bf4 ,請問這是可行的嗎?
如果並非架構問題 / 以前有踩過無法處理的坑,那我會想試試看發 PR 來處理這個問題。
from running_page.
@yihong0618 我隨意問了下 ChatGPT https://chat.openai.com/share/1db41f61-a363-44fb-a63a-a5701e922bf4 ,請問這是可行的嗎?
如果並非架構問題 / 以前有踩過無法處理的坑,那我會想試試看發 PR 來處理這個問題。
抱歉哈我忘了,这个 mapbox 怎么处理的了(这块两年没改了),理论上不需要改,我晚上研究研究。
PR welcome
from running_page.
如果觉得有安全问题的话,可以放在settings/secrets/actions。然后在const.ts
文件中读取secrets
,欢迎PR。
from running_page.
@yihong0618 @orionna319 感謝回復,我晚點處理看看
from running_page.
-
https://stackoverflow.com/a/21941683
In short, no. If your GitHub repo is public, all its assets are public. You can make the repo private and it will still publish on GitHub Pages if named with the
username.github.io
convention or if it has agh-pages
branch. While that's an option, that's not necessarily the right thing to do. -
https://stackoverflow.com/a/61857467
如果想藉由改動專案結構來處理這問題,好像不管如何都避不開
from running_page.
@yihong0618 @orionna319 看起來確實如 #643 (comment) 所說不用重構專案,但需要根據 #643 (comment) 更新README.md
/ 於src/utils/const.ts
對應位置上新添加提示 command
from running_page.
好像是的,就算存储在settings/secrets
中,在web端也会显示调用MAPBOX_TOKEN
如果想藉由改動專案結構來處理這問題,好像不管如何都避不開
from running_page.
当然比较好的处理方式是,MAPBOX_TOKEN
放在settings/secrets
下,然后再设置Mapbox-URLs
。
from running_page.
当然比较好的处理方式是,
MAPBOX_TOKEN
放在settings/secrets
下,然后再设置Mapbox-URLs
。
@orionna319 如果你上面那段(關於Mapbox-URLs
這看不大懂)指的是 https://stackoverflow.com/questions/21939713/hide-api-key-for-a-github-page/61857467#61857467 :
確實,資安不求完美但也不嫌多,這樣的做法雖說不能避免 Client 端從瀏覽器開發者工具看到 Mapbox token,但確實能避免明碼將 token 寫在 repo 中(滿足包含我在內一部分對資安比較敏感開發者的強迫症 🤣)。
from running_page.
Related Issues (20)
- gpx文件怎么转换tcx,想把keep的运动导入到悦动圈 HOT 1
- pnpm install 提示错误 HOT 25
- 请教为什么国家解析不对 HOT 11
- gpx文件未生成 HOT 10
- localhost拒绝访问 HOT 2
- docs: README.md/README-CN.md 新增第一次部署後的操作導引(個人建議) HOT 3
- 使用--with-tcx参数获取咕咚数据,导出来的TCX文件导入Garmin还是会提示报错无法导入 HOT 1
- 看了几天代码,有几个自己的想法不知道对不对? HOT 21
- 我发现 Run Data Sync.yaml 在跑的时候-Garmin_cn 执行就死循环了 HOT 9
- 为什么数据库删除的数据前端还是有 HOT 2
- Cloudflare 部署的是作者演示画面 HOT 9
- v HOT 1
- Can't get nike refresh_token HOT 3
- 数据库的地区格式不统一影响吗 HOT 2
- 悦跑圈抓取数据时错误,遇到错误:Max retries exceeded with url错误。 HOT 7
- 咨询下docker的工作原理 HOT 1
- 请教, 开始从咕咚拉数据的时,没有带 --with-gpx,后续怎么得到GPX数据 HOT 3
- 如何把国家涂上色 HOT 3
- 源自华米的GPX导入轨迹漂移,且心率为空 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from running_page.