You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "richardfogaca (via GitHub)" <gi...@apache.org> on 2025/05/09 12:27:19 UTC

[D] Configurable MAX_URL_LENGTH [superset]

GitHub user richardfogaca created a discussion: Configurable MAX_URL_LENGTH

## Contribution Summary

This is a proposal to add a configuration to increase the maximum URL length limit (MAX_URL_LENGTH), making it possible to share more complex dashboard configurations with larger filter sets via URL. This enhancement addresses a limitation where URLs that exceed the default 8000 character limit are truncated, causing complex dashboard states to be lost when shared.

## How It Works

The solution adds MAX_URL_LENGTH as a configurable setting that is exposed to the frontend through three key changes:

1. Added MAX_URL_LENGTH to the FRONTEND_CONF_KEYS list in `superset/views/base.py`, making it accessible to the frontend via the bootstrap data
2. Added a configuration value in `superset_config.py` for MAX_URL_LENGTH, e.g: to 800000
3. The existing exploreUtils.js now properly reads this configuration from bootstrap data

When a user shares a dashboard URL that contains a large amount of form data (such as complex filter configurations), Superset will now respect the configured MAX_URL_LENGTH instead of hardcoding an 8000 character limit.

## Fork with working prototype
The implementation is available in this [fork](https://github.com/richardfogaca/superset/tree/configurable-max-url-length)

## Why This Matters

1. **Sharing Complex Dashboards**: Users often need to share dashboards with specific filter configurations that can result in very long URLs.

2. **Preventing Data Loss**: Without this change, URLs exceeding 8000 characters are truncated to a minimal representation, showing only the datasource and viz_type, with a message "URL_IS_TOO_LONG_TO_SHARE" - effectively losing the dashboard state.

3. **Enterprise Environments**: Many enterprise environments with complex data and numerous filters require larger URL parameters to maintain dashboard states when sharing.

4. **Configurable Solution**: By making this a configurable parameter rather than a hardcoded value, administrators can adjust the limit based on their specific environment needs and proxy server configurations.

5. **Minimal Change**: This enhancement requires minimal code changes while providing significant usability improvements for organizations with complex dashboards.

GitHub link: https://github.com/apache/superset/discussions/33395

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org