-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[core] Added IGNORE_CUSTOM_CACHE_TIMEOUT option #894
Conversation
Thanks for the PR 👍
I agree, this is a server-side issue.
This doesn't feel right to me and is confusing to new users. Users might also question if the parameter is even applied in their specific situation, which adds a layer of uncertainty. An alternative to this is replying with the "301 Moved Permanently" header. Feed readers and browsers will automatically follow the location provided in the header. Here is some code for reference: header('Location: index.php?action=...', true, 301); Would that work for you? |
Yep. Implemented that. |
Almost. Maybe I should have explained myself better. You can remove Line 129 in 78c69b0
by this: unset($params['_cache_timeout']);
header('Location: ' . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) . '?' . http_build_query($params), true, 301);
die(); So, if |
This reverts commit 32b9e00.
…present but CUSTOM_CACHE_TIMEOUT is disabled
Merged. Thanks for keeping it updated! 👍 |
…SS-Bridge#894) Requesting `_cache_timeout` on servers where this option is disabled currently results in the error message 'This server doesn\'t support "_cache_timeout"!'. This commit changes that behavior to redirect to the query without `_cache_timeout`.
Explaining my usecase. For some reason I enabled custom_timeout in my config, but forgot to disable it back. Meanwhile some users already generated feed urls with _cache_timeout parameters. So if I disable custom_timeout back, those feed urls become invalid, which is not good.
So, I added option to ignore _cache_timeout param in url.