Custom public middleware

Hi,
Here’s my usecase : I want to have a second public folder (alongside Strapi’s public/ own folder, which has its own public middleware strapi::public). This folder would have this kind of structure :

...
-- /src
-- /public ⬅️ Strapi's own public folder
-- /custom-public   ⬅️ custom public folder
   -- /custom-public-subdirectory-1 ⬅️ public but protected
      - index.html
      - /styles
      - /scripts
   -- /custom-public-subdirectory-2 ⬅️ public but protected
      - index.html
      - /styles
      - /scripts
   -- /custom-public-subdirectory-3 ⬅️ public but protected
      - index.html
      - /styles
      - /scripts
etc...

I tried to investigate by myself and found the definition for Strapi’s own public middleware, but I can"t seem to understand it.

I need to have a second public folder, with its own middleware because each subdirectories access will be protected with my own logic (those are paid content).

Strapi’s /public folder must still work.

My questions are :

Thanks !