justdoit123
V2EX  ›  webpack

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

  •  
  •   justdoit123 · Jul 2, 2024 · 1365 views
    This topic created in 712 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   ·   5771 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 01:56 · PVG 09:56 · LAX 18:56 · JFK 21:56
    ♥ Do have faith in what you're doing.