Maven docker-maven-plugin 插件 Push 413 错误

这个 413 错误 有 2 个方面的,第一是 nginx 反向代理的问题。

通常这个将包的大小设置到 1024m 都能解决。

我们的坑

我们的坑的错误是我们使用了 cloudflare。

cloudflare 有数据上传限制。

否则会抛出下面的的提示:

<html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>cloudflare</center>
</body>
</html>

考古后发现下面的配置:

Cloudflare limits upload size (HTTP POST request size) per plan type:

  • 100MB Free and Pro
  • 200MB Business
  • 500MB Enterprise by default

2022-10-20_02-04-38

如果你需要上传超过上面大小的数据的话,就不能使用 Cloudflare 的 CDN 缓存功能。

你可以只使用 Cloudflare 的 CDN 服务来解决这个问题。