V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
justdoit123
V2EX  ›  webpack

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

  •  
  •   justdoit123 · Jul 2, 2024 · 1263 views
    This topic created in 672 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   ·   2600 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 11:06 · PVG 19:06 · LAX 04:06 · JFK 07:06
    ♥ Do have faith in what you're doing.