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

Allow http.Client used in discovery to be modified (typically for sec… #57

Merged
merged 1 commit into from
Feb 12, 2023
Merged

Allow http.Client used in discovery to be modified (typically for sec… #57

merged 1 commit into from
Feb 12, 2023

Conversation

steve-hellwege-wdc
Copy link
Contributor

@steve-hellwege-wdc steve-hellwege-wdc commented Feb 8, 2023

…urity reasons)

[why]
The importing application may have some specific security requirements that necessitate a change to the http.Client or http.Transport used when fetching the xml from the UPnp server. For example, the importing application may want to restrict localhost calls which could be made by an attack server on the local network.

[how]
Create a global HTTPClient which defaults to http.DefaultClient. This allows the importing application to modify this global if it wishes to make changes to the http.Client/http.Transport used when fetching the xml from the UPnP server.

@steve-hellwege-wdc
Copy link
Contributor Author

@huin ,can you please review/merge this? Thank you.

@huin
Copy link
Owner

huin commented Feb 10, 2023

I'll take a look on the weekend, my weeknights are a bit busy.

…urity reasons)

[why]
The importing application may have some specific security requrirements that necessitate
a change to the http.Client or http.Transport used when fetching the xml from the UPnp server.
For example, the importing application may want to restrict localhost calls which could be
made by an attack server on the local network.

[how]
Create a global HTTPClient which defaults to http.DefaultClient.  This allows the importing
application to modify this global if it wishes to make changes to the http.Client/http.Transport
used when fetching the xml from the UPnP server.
@huin
Copy link
Owner

huin commented Feb 12, 2023

Thanks!

@huin huin merged commit 9278656 into huin:main Feb 12, 2023
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.

None yet

2 participants