0

我目前正在制作一个用于密码重置的网站。我使用 vue-cli、postgresql 和 postgrest。为了保护我的网站和 RESTful API 之间的信息交换,我使用了一个 jwt,我把它放在我的请求的标头中。我的问题是,当我提出这些请求时,人们可以从外部找到 jwt。

那么是否可以将这个 jwt 隐藏在标题中?或者还有其他方法可以在 vue 和 RESTful API 之间发出安全请求吗?

我的函数使用获取请求:

enregsitrerIdent : function(){
                let resquestOptions = {
                    method :"POST",
                    headers:{"Content-Type" : "application/json", "Authorization": this.tokenPostgRESt},
                    body :JSON.stringify({"ident":this.identifiantUrl, "mail":this.mail})
                }
                fetch('http://localhost:3000/view_personnalurl', resquestOptions)
                    .then(response => response.json())
            },

每个人都可以看到的 jwt 令牌:

请求头

4

0 回答 0