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

remove absolute url #18148

Merged
merged 1 commit into from
Mar 10, 2023
Merged

remove absolute url #18148

merged 1 commit into from
Mar 10, 2023

Conversation

benderl
Copy link
Contributor

@benderl benderl commented Mar 10, 2023

Description:

The "Manage File System" page uses an absolute URI including wifi ip to switch between flash and sd card. If your device uses an ethernet port and has wifi turned off or not configured, the link target resolves to http://0.0.0.0/ufsd?.

This PR changes the target to only use a relative URI without ip. So the browser will use the ip or hostname of the current page.

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works with Tasmota core ESP32 V.2.0.7
  • I accept the CLA.

I have only a ESP32 dev board and cannot test on ESP8266 hardware, but the change is minimal and should also be valid for this platform.

@Jason2866
Copy link
Collaborator

@bend @s-hadinger imho it would be better to fix the IP 0.0.0.0 to the one which is used and valid
Dont know the side effects (breaking change?) by this PR

@benderl
Copy link
Contributor Author

benderl commented Mar 10, 2023

No, it's not breaking anything. All other links i found in the modified file do not use an absolute URI with protocol and host (hostname or ip).

If you really would want to use a host in the URI, things become quite complicated. What if there are multiple network devices? You would have to parse the request, to find the right host currently used in this session. But that is a lot of work for something, that is not needed.

@s-hadinger
Copy link
Collaborator

In principle I agree that not specifying the IP is better. Unless it brakes something (which I don't see why it would), I approve.

@Jason2866 Jason2866 merged commit d25ef16 into arendst:development Mar 10, 2023
@Jason2866
Copy link
Collaborator

Let us see if issues arrives ;-)

@benderl benderl deleted the fix-ufsd-link branch March 10, 2023 14:46
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