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

Redirect feature #193

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Redirect feature #193

wants to merge 5 commits into from

Conversation

lamerjack
Copy link

With gen3 devices is mandatory to use port 80...
so i have to use a different port for my webserver for example port 8080.
with this mod if add after the line:
fauxmo.setPort(80); // This is required for gen3 devices

this one
fauxmo.setRedirect(8080); //redirect everything not found to port 8080
all calls to fauxmoesp that is not processed will be redirected to port 8080

@pvint
Copy link
Member

pvint commented Aug 28, 2021

This looks good, and is a great idea!

I'll try to do a test tonight or tomorrow and merge it.

Thanks!

@lamerjack
Copy link
Author

Sorry i found a error in file src/templates.h
line 43 correct is:
"<script>window.location = 'http://'+window.location.hostname+':%d'+window.location.pathname+window.location.search;</script>"

@jodovaljow
Copy link

I think that the best solution is using redirect HTTP status code and Location header

https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections

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