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

Support reverse proxies #131

Merged
merged 2 commits into from
Apr 24, 2023
Merged

Support reverse proxies #131

merged 2 commits into from
Apr 24, 2023

Conversation

mohamed--abdel-maksoud
Copy link
Contributor

As rightfully requested in #93 . With reverse proxies, algernon can replace nginx in certain use cases.

I did not see why this config should be dynamically set in Lua, so I added a static configuration flag. This setup might also be useful for other config options. I'm open to change that though if needed.

Problem: given a set of prefixes, test a string for the longest prefix
in `O(n)` where `n` is the maximum prefix length.
Some options such as reverse proxy configuration are static, hence
setting them via Lua doesn't add much value. This commit introduces
the flag `-sconf` which accepts a JSON static configuration. Currently
it only supports specifying reverse proxies as in the example
`samples/static-config.json`.
@xyproto
Copy link
Owner

xyproto commented Apr 24, 2023

Thank you. I appreciate the merge request. Adding reverse proxy capabilities to Algernon was needed! The changes have been merged in.

I might change the flag and/or the way of configuring this a bit, just to make it more in line with the rest of Algernon.

I'm looking forward to using this feature on my little Linode instance! Thanks again.

@xyproto xyproto merged commit f5a2175 into xyproto:main Apr 24, 2023
@mohamed--abdel-maksoud
Copy link
Contributor Author

Thanks you for Algernon.

I might change the flag and/or the way of configuring this a bit, just to make it more in line with the rest of Algernon.

Sure.

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

Successfully merging this pull request may close these issues.

2 participants