justdoit123
V2EX  ›  webpack

[前端] 前后端分离开发过程中,对 session 有依赖,如何优雅处理?

  •  
  •   justdoit123 · Jul 2, 2024 · 1524 views
    This topic created in 770 days ago, the information mentioned may be changed or developed.

    有一个页面及其相关 api 需要加上一些保护,这些保护的上下文存储在 server session 中的。

    前端开发的时候,webpack devServer 转发的 api 会因为过不了这些保护检查而被拦下。不知道各位有没有比较优雅的方案?

    我们现在是手动的把 cookie 复制在 localhost 域名下。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5561 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 07:02 · PVG 15:02 · LAX 00:02 · JFK 03:02
    ♥ Do have faith in what you're doing.