Skip to content

Middleware not working properly, autowiring issue? #10

@alturic

Description

@alturic

I seen one of the latest tickets is related to the getAttributes() request method however my issue is related to using the ip-addr-middleware package to grab the client ip from the request and since it uses ->getAttributes, perhaps my problem is semi-related.

So I added the ip-addr-middleware package exactly as described in the docs (https://github.com/akrabat/ip-address-middleware) and while I can retrieve the ip address using the example route shown in that doc, getAttributes() is empty on my auto-wired controllers. Im curious if this is because when the route is __invoke’d it is instantiating a new request object or if theres some other configuration issue that I completely screwed up, any ideas what could cause this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions