angular ssr如何将客户端的数据传递到服务端

客户端:

if (isPlatformBrowser(this.platformId)) {
      this.cookieService.set("clientDomain",encodeURI(domain));
      this.cookieService.set("clientClubName",clubName);
    }

 

服务端:

 server.get('*', (req, res) => {
   
    console.log(req.headers.cookie)

    
  });    

 

posted @ 2023-03-29 23:07  jahoon  阅读(25)  评论(0编辑  收藏  举报