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

how to change session path #31

Closed
wtser opened this issue Dec 10, 2015 · 4 comments
Closed

how to change session path #31

wtser opened this issue Dec 10, 2015 · 4 comments
Assignees

Comments

@wtser
Copy link

wtser commented Dec 10, 2015

router

Route.post('/admin/login', 'AdminController.login');

code

  *login(request, response) {
    const method = request.request.method;
      const postData = request.post()
      if (postData.account == "wtser@qq.com" && postData.password == "123456") {
        yield request.session.put(postData)
      } else {
        return "用户名或密码错误"
      }
  }

image

the path is /admin,so how can i change it to /?

@thetutlage
Copy link
Member

I have updated docs and code to support options for cookies http://adonisjs.com/docs/1.0/request#session-management

@thetutlage thetutlage self-assigned this Dec 10, 2015
@thetutlage
Copy link
Member

Also make sure to update adonis-framework to version 1.2.0

@wtser
Copy link
Author

wtser commented Dec 11, 2015

thx

@lock
Copy link

lock bot commented Mar 12, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants