Closed YOU54F closed 5 years ago
The image I have created with the change in, is published here https://hub.docker.com/r/you54f/pact-broker-nginx. 👍
Hey, sorry. I only just saw this. Just wondering what, if any, negative implications there might be for increasing it to 10MB?
No worries duck,
I'll do some reading up on any potential side-effects, I think setting it too high could open a web-service up to DOS attacks, but with it only being 10mb, I don't think it makes much of an issue.
We have slimmed down the pacts now by using a much smaller encoded base64 string, so our pacts are no longer over 1mb
I've recently been trialling pb with puma (https://github.com/YOU54F/pact-standalone-docker-slim/tree/master/pact_broker_puma) and currently messing about with trying to get pact broker working in AWS lambda.
Have any of your other customers ever had issues with large pacts? Looking at the issues logs, I seem to the only one who has raised this?
I'm thinking this may be redundant now the new puma version is out? Once it's stable, I'll be deprecating this image.
Oh, and yes, you're the first to raise this!
Thanks @bethesque, I’ll trial the new puma based image at work next week and pass back any feedback 👌
Hey,
We have a pact test where the provider service is expecting a base64 encoded PDF to be received in their request. My completed pact contract is 2.6mb and is rejected by nginx config, when attempting to push up to the pact-broker.
Looking at the nginx docs, the
client_max_body_size
is 1mbI have been able to get this to work by changing
client_max_body_size
to 10Mpact_broker-docker/container/etc/nginx/sites-enabled/webapp.conf
From
To
I have tested this locally by spinning up the repo, with the above change, and I can publish my pact and view it on the broker.
Would you be happy adding it into the main image? If not, not problem, I will just set up something up to subscribe to updates to the pushed docker image, and build our own with the updated nginx.conf.
Many thanks in advance!