Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README: Login loader params #25

Open
ferdinandlist opened this issue Oct 13, 2024 · 0 comments
Open

README: Login loader params #25

ferdinandlist opened this issue Oct 13, 2024 · 0 comments

Comments

@ferdinandlist
Copy link

I had a problem with the example login loader in the readme. LoaderFunctionArgs does not have a response param. As a result I had to set response headers as follows after consulting remix docs at https://remix.run/docs/en/main/route/loader#returning-response-instances.

return json(
  options, 
  {  
    headers: {
      "Set-Cookie": await sessionStorage.commitSession(session), 
      "Cache-Control": "no-store"
    }
  }
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant