Middleware compose for provider files? #19

Closed
opened 2025-12-29 09:21:41 +01:00 by adam · 4 comments
Owner

Originally created by @polds on GitHub (Jan 4, 2025).

Is it possible to use the "middleware compose" logic for file provider orchestrators?

I tried creating a config/middlewares/doRedirect.yml with:

doRedirect:
  - use: RedirectHTTP

And then setting this in one of my providers:

  middlewares:
    doRedirect@file:

But I get the error:

doRedirect@file: unknown middleware

Originally created by @polds on GitHub (Jan 4, 2025). Is it possible to use the "middleware compose" logic for file provider orchestrators? I tried creating a `config/middlewares/doRedirect.yml` with: ```yaml doRedirect: - use: RedirectHTTP ``` And then setting this in one of my providers: ```yaml middlewares: doRedirect@file: ``` But I get the error: > doRedirect@file: unknown middleware
adam closed this issue 2025-12-29 09:21:41 +01:00
Author
Owner

@yusing commented on GitHub (Jan 4, 2025):

Is it possible to use the "middleware compose" logic for file provider orchestrators?

Yes it is possible, seems to be a bug.

Did this line appear in log middleware loaded name=doRedirect@file src=doRedirect.yml?
I've tested on latest v0.7.7 and v0.8 nightly, both works.

@yusing commented on GitHub (Jan 4, 2025): > Is it possible to use the "middleware compose" logic for file provider orchestrators? Yes it is possible, seems to be a bug. Did this line appear in log `middleware loaded name=doRedirect@file src=doRedirect.yml`? I've tested on latest v0.7.7 and v0.8 nightly, both works.
Author
Owner

@polds commented on GitHub (Jan 4, 2025):

Hmm.. it's working now for some reason. Maybe I hadn't reloaded the config. Thanks for the fast response!

@polds commented on GitHub (Jan 4, 2025): Hmm.. it's working now for some reason. Maybe I hadn't reloaded the config. Thanks for the fast response!
Author
Owner

@yusing commented on GitHub (Jan 4, 2025):

Middleware compose files does not support hot-reload for now. Will definitely work on it!

@yusing commented on GitHub (Jan 4, 2025): Middleware compose files does not support hot-reload for now. Will definitely work on it!
Author
Owner

@polds commented on GitHub (Jan 4, 2025):

Oooh! Gotcha. Thanks again!

@polds commented on GitHub (Jan 4, 2025): Oooh! Gotcha. Thanks again!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/godoxy#19