plane icon indicating copy to clipboard operation
plane copied to clipboard

[feature]: Make frontend static asset rate limits configurable through environment variables

Open smonksi opened this issue 2 weeks ago • 1 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

This proposal is related to the static asset rate-limit problem discussed in issue [#9977], [#10341] and pull request [#10200]).

Summary

Make the per-client-IP rate limits applied to static assets by the Web and Admin frontend Caddy servers configurable through environment variables, with the existing default of 300 requests per minute retained.

Problem

Plane currently applies a fixed rate limit of 300 requests per minute to static asset requests, using the client's IP address as the rate-limit key.

This can cause HTTP 429 responses during entirely normal application use. In particular, loading or refreshing a workspace page can generate several hundred individual JavaScript and other static asset requests.

The limit is shared by all browser sessions originating from the same public IP address. Consequently, multiple users, devices or browser sessions behind the same NAT gateway can collectively exhaust the allowance.

This is particularly problematic for self-hosted installations, where administrators may have several active sessions or users sharing a public IP address.

The resulting behaviour is that a full page load or refresh can fail with HTTP 429 responses, even though normal application interaction after the page has loaded works correctly.

Proposed solution

Expose the static asset rate limits as configurable environment variables in the self-hosted deployment configuration:

WEB_ASSET_RATE_LIMIT=300
ADMIN_ASSET_RATE_LIMIT=300
  • WEB_ASSET_RATE_LIMIT: Maximum static asset requests per client IP per minute for the main Web frontend.
  • ADMIN_ASSET_RATE_LIMIT: Maximum static asset requests per client IP per minute for the Admin (God Mode) frontend.

The existing value of 300 requests per minute should remain the default when the variables are not specified.

The values should be passed into the respective frontend Caddy containers and used by their Caddy rate-limit configurations.

The configuration should be documented in the self-hosted deployment environment-variable documentation.

Why should this be worked on?

A fixed limit cannot accommodate the different deployment patterns and usage characteristics of self-hosted installations.

For example, installations with multiple users sharing a public IP address, administrators using several browser sessions, or deployments with particularly large frontend bundles may legitimately exceed the current limit.

Making the limits configurable would:

  • Preserve the existing default security behaviour.
  • Allow administrators to increase the limits where legitimate usage requires it.
  • Avoid unnecessary HTTP 429 responses during normal application loading.
  • Remove the need for administrators to maintain custom Caddyfiles or modify frontend container configurations.
  • Provide a straightforward, supported configuration mechanism for self-hosted deployments.

This proposal does not seek to remove rate limiting or change the recommended default. It simply gives administrators control over a setting that currently cannot be adjusted without modifying the supplied frontend configuration.

smonksi avatar Nov 17 '26 15:11 smonksi