Skip to content

Impossible to attach middleware to endpoints #130

@woodlamp-tech-admin

Description

@woodlamp-tech-admin

I must be insane, because I see example after example online of this being done, yet it doesn't work on my system.

I have this:

(component/system-map
  :site-middleware (new-middleware {:middleware site-middleware-config})
  :site-endpoint   (-> (new-endpoint site-routes)
                       (component/using [:site-middleware]))
  :handler         (-> (new-handler :router :bidi)
                       (component/using [:site-endpoint]))
  :http            (-> (new-web-server (:http-port config))
                       (component/using [:handler])))

The middleware isn't mounting. I can't figure out from the code how Handler does its magic, but example after example shows that this is how to do it.

What am I doing wrong?

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