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

Add TLS to the web server #2086

Merged
merged 5 commits into from
Jul 20, 2024
Merged

Conversation

Randy-Blancett
Copy link
Contributor

Title

This change will allow spotDL web server to be run on HTTPS.

Description

Add the ability to run the web server in HTTPS.
Added the following Command Line Parameters

  • --enable-tls: Unless this flag is set the changes will be ignored
  • --cert-file: The file path to the Cert File
  • --key-file: The file path to the Key File
  • --ca-file: The File path to the Certificate Authority File to use

Related Issue

#2085

Motivation and Context

This allow the server to be run in HTTPS mode. This allows the web server to be run in home labs with out the "insecure" marking in the web browser.

How Has This Been Tested?

I have downloaded / built the application and executed it both with the --enable-tls flag added and it left out.
I have verified that It will stand up in HTTP mode when the flag is not added and It will stand up in HTTPS using the passed cert files when the flag is passed.
I have also modified the code so that the initial launch of the web browser will load the proper protocol.

Run on standard Ubuntu Linux environment.

Code changes are limited to adding arguments and modifying how the web server is started. Unintended consequences are also limited because the code changes are inside an if statement that can be disabled via a command line flag.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have read the CORE VALUES document
  • I have added tests to cover my changes
    • I do not see any examples of testing the web server stand up procedure
  • All new and existing tests passed

@Silverarmor Silverarmor requested a review from xnetcat May 8, 2024 06:43
@Silverarmor Silverarmor changed the base branch from master to dev May 8, 2024 06:43
@Randy-Blancett
Copy link
Contributor Author

I Wanted to check on this, It seems like the test that is failing is due to something other than the code I added. However I wanted to check and see if there is anything I should be doing to trouble shoot / fix the failed test?

@xnetcat xnetcat merged commit d78d071 into spotDL:dev Jul 20, 2024
1 of 10 checks passed
@xnetcat xnetcat mentioned this pull request Jul 21, 2024
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