I added a command to do base64url encoding and decoding. I also added an expired and ip_matches command that will compare with the current timestamp and ip address. These are building blocks for an alternative secure link module.
Added set commands for base64url and expired
@mevdschee Thank you for your contribution!
Several comments though:
Will you fix these?
I'll try to adjust the code to fix these issues. Thank you.
Adjustments made after review by agentzh
I made the adjustments you requested in fd8b988. Does it look good to you?
@mevdschee Thank you for the quick fixes! Some more suggestions:
@mevdschee Also, will you mind adding some documentation for the new directives to README? Thanks!
Do you want me to update src/ngx_http_set_base64.c and src/ngx_http_set_base64.h as well?
@mevdschee Preferably in a separate branch and separate pull request :) Thanks!
How do I update the documentation? What did you make those readme's with? I see a reference to "wiki2markdown.pl" in a comment. What is that and where can I get it? Is there an online editor for that ".wiki" format? Does it adhere to any standard?
@mevdschee You're recommended to include your changes in the .wiki file in your patch. You can use the wiki.nginx.org site to test your changes.
More adjustments made after review by agentzh
Okay.. I updated the code in b51046b. I hope it is good now.
Also, I have found "wiki2markdown.pl" in https://github.com/agentzh/nginx-devel-utils
Updated documentation as requested.
Okay.. Now how do you do update the plain text README? The wiki and markdown are updated in 29b18d2.
Updated the plain text README accordingly
I have found wiki2pod.pl and the pod2text Linux tool. The README is updated in 02e12a3.
@mevdschee Thanks for the updates! I'll try to merge your patch soon :)
Added ip_matches directive and documentation
Improved test cases
Forgot to reset DDEBUG flag
NB: I have added IPv6 test cases for ip_matches.
@mevdschee Hmm, seems that you've already put 3 unrelated features in this single pull request. Alas.
Will you split these unrelated features into 3 different branches and create 3 different pull requests separately? Mixing things together makes the review and merge process on my side much harder. I prefer small atomic changes in every pull request. Thank you for your cooperation!