Set-Cookie not working over Tunnels

I have frontend at frontend.example.com and backend at backend.example.com the backend sends Set-Cookie Header but it not being set in the browser on the client
token=cookie; Path=/; HttpOnly; Secure; SameSite=NoneRequest

    // Set the JWT as an HttpOnly cookie
    http.SetCookie(w, &http.Cookie{
        Name:     "token",
        Value:    jwtToken,
        Path:     "/",
        HttpOnly: true,
        Secure:   true,
        SameSite: http.SameSiteNoneMode,
    })


this the my go backend code

both are over https over cloudflare tunnels
Was this page helpful?