Multiple improvements/features (pagination, etc)#8
Open
drdaeman wants to merge 7 commits into
Open
Conversation
Rather than using gsub to replace apostrophes, a proper way to sanitize is to use escape_string method (which is essentially libpq's PQescapeStringConn)
- Implements pagination, 25 rows per page by default - Uses sinatra-params gem for parameter passing
A quick hack to support multiple servers instead of just one. Allows to avoid running multiple instances and having to set up manual routing with e.g. nginx.
- If there's a single server, automatically redirect - If there are many, show a list - Correctly 404 if a non-existent URL is requested
Known issues: no CSRF protection, I can't figure out how to use Rack::Csrf or Rack::Protection::AuthenticityToken or whatever else.
Owner
|
Thanks for working on this and sorry that I haven't seen the PR earlier. Please feel free to ping me by mentioning @kirs in the future. I'm happy to accept the PR, but I think it's still possible to make the config format backward compatible to avoid breaking the tool for the rest of users. It should be a trivial condition to check if the config file is using single level or if it's nested. Is it something that you'll have time to work on? Thanks again for your contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! As I've mentioned in #7, I've did some enhancements for personal use purposes, which I'd like to share:
If there are any changes you'd like me to make to those commits, please feel free to advise.
Thanks!