gpt4 book ai didi

javascript - MEAN API 请求方法问题

转载 作者:太空宇宙 更新时间:2023-11-04 02:12:43 24 4
gpt4 key购买 nike

我正在阅读 Simon Holmes 编写的《Getting MEAN with mongo,express,Angular and Node》一书。我很喜欢它,但我有一个大问题似乎没有在书中涉及,他正在谈论通过http请求的rest-api(我在书中向前看了一点,看到有一个登录系统),这触发了我一点,在http中做所有事情是不是有风险?我的另一个问题是,当您在 Heroku(以及您所有的网站)中加载其余 api 时,请求是 https 中的,因为它们强制使用 https(我知道这是因为我在 http 中发出请求而无法加载 Google 字体)

最佳答案

isn't it risky to do everything in http

它不太安全。人们可以以纯文本形式阅读任何请求。

when you load your rest api in Heroku (and all your website) are the request in https

虽然您可以使用 HTTP,但您可以通过 HTTPS 发出任何请求,无需任何费用。当您上传真实的应用程序时,您还需要将服务器配置为重定向到 HTTPS。

关于javascript - MEAN API 请求方法问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41484177/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com