Skip to content

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