prooph / event-store-http-api

Prooph EventStore HTTP API
http://getprooph.org/
BSD 3-Clause "New" or "Revised" License
18 stars 3 forks source link

Configurable base url #11

Closed codeliner closed 7 years ago

codeliner commented 7 years ago

I'd like to use the event-store-http-api as a dockerized service in a prooph/micro environment with an Nginx api gateway in front of it. To identify services by uri path I'd like to put the http api under a specific path. I added a BaseUrl middleware that is inspired by blast-base-url but configuration driven instead of detecting the base url by directory structure. The latter does not work in the set up I've mentioned.

Together with the BaseUrl middleware I've also changed composer.json and config/pipeline.php to .dist files. I already have the problem, that I need to add pdo-event-store as a dependency to composer and doing this I can no longer push changes without excluding the composer.json manually.

With the change it is now possible to add custom dependencies and pipe them accordingly. For example if I want to add authentication this can now easily be done by pulling in a authentication middleware and add it early in the pipeline.

prolic commented 7 years ago

You added .dist files, so please update travis to make the tests run again.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-6.8%) to 40.523% when pulling 53b31235fe00c4bddd36f285809ca5b1ad8d82a2 on feature/base_url into b20ac6bfc632743b73d7df5e4bf4a90b8b861ee2 on master.

prolic commented 7 years ago

👍