Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding variable support to slice module #571

Open
lucasRolff opened this issue Mar 9, 2025 · 2 comments
Open

Adding variable support to slice module #571

lucasRolff opened this issue Mar 9, 2025 · 2 comments
Labels

Comments

@lucasRolff
Copy link

Describe the feature you'd like to add to nginx

It would be really nice to be able to set a variable for the slice directive in the slicing module, so it can be set/loaded from e.g. Redis (if one were to load variables from Redis via Lua for example).

Describe the problem this feature solves

Currently it's not possible to control the slice size via a variable, meaning if you want to change this for a given host, you'd need a completely new server block.

Instead it would be nice to be able to set the slicing size through a variable, and pass the variable to the slice directive.

Additional context

I use nginx with the nginx lua module, and I load a lot of my server block config from Redis into variables.
However, sometimes I want to either disable or enable slicing for a given host (e.g largefiles.cache.com) but keep it disabled for smallfiles.cache.com).

@Bit-Warrior-X
Copy link

Hi, @lucasRolff
I have solved current issue.
please contact with me

@lucasRolff
Copy link
Author

Should be possible to share your solution with the public then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants