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

rest middleware calls deprecated context method #2663

Closed
azatoth opened this issue Aug 23, 2016 · 3 comments
Closed

rest middleware calls deprecated context method #2663

azatoth opened this issue Aug 23, 2016 · 3 comments

Comments

@azatoth
Copy link
Contributor

azatoth commented Aug 23, 2016

in https://github.com/strongloop/loopback/blob/2.x/server/middleware/rest.js#L60 there is a call to loopback.context which is now deprecated.

cc @bajtos

@bajtos
Copy link
Member

bajtos commented Aug 23, 2016

I am afraid this is necessary in order to preserve backwards-compatibility for applications relying on this feature.

I am advising to disable the built-in context middleware in server/config.json:

{
  "remoting": {
    "context": false
  }
}

@bajtos
Copy link
Member

bajtos commented Aug 23, 2016

I added a section to our documentation explaining how to get rid of that deprecation warning.

See https://docs.strongloop.com/display/APIC/Using+current+context#Usingcurrentcontext-Fixingdeprecationwarnings

@crandmck could you PTAL at the added text and edit/improve it as needed?

@bajtos bajtos closed this as completed Aug 23, 2016
@crandmck
Copy link
Contributor

I made some small edits/clarifications. It seems pretty straightforward.

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

3 participants