Skip to content

http redirection (basic wifi range extender) #2726

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

Closed
wants to merge 2 commits into from

Conversation

quertenmont
Copy link

Adding a special case for http request redirection to another server
"/fwd/" address are used to trigger this mode

http://SERVERIP/fwd/REDIRECTIP --> very useful in meshnetwork architecture
http://192.168.0.7/fwd/192.168.4.2 --> for instance, this allows to connect the chip with IP 192.168.4.2 which is connected to the softAP of node 192.168.0.7
Both GET and POST requests are supported, which is very convenient in order to use the HTTPUpdater in multi-hop network

//http://SERVERIP/fwd/REDIRECTIP --> very useful in meshnetwork architecture
//http://192.168.0.7/fwd/192.168.4.2 --> for instance, this allows to connect the chip with IP 192.168.4.2 which is connected to the softAP of node 192.168.0.7
// (POST requests are also supported)
if(url.indexOf("/fwd/") == 0){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This certainly has to be an optional feature. You can implement it as a library which provides a class derived from a RequestHandler, instead of plugging directly into the server class.

@quertenmont
Copy link
Author

Nop, Actually it can't be implemented the way you suggest, because one need to have access to all the request before they get preprocess. (Headers typically).

@earlephilhower
Copy link
Collaborator

This is quite old and needs large refactoring to address @igrr's comments. The new PR #5214 looks like it can do things like this, for those so inclined, so closing this to clean up the PR list.

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.

3 participants