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

feature: add support for base dir #2

Merged
merged 6 commits into from
Jun 5, 2021

Conversation

OGKevin
Copy link
Contributor

@OGKevin OGKevin commented May 22, 2021

BaseDir allows one to serve files that are stored on the host machine.

@OGKevin OGKevin force-pushed the add-hostpath-support branch from c2acb3a to b075391 Compare May 22, 2021 10:52
Copy link
Owner

@DSpeichert DSpeichert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution.

I'll be happy to accept a static/local handler feature. While it wasn't something I originally thought has place here, if it makes sense for you, it probably will make sense for others.
I do have some concerns about sanitization that are added inline.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
httpd/handler.go Outdated Show resolved Hide resolved
httpd/handler.go Outdated Show resolved Hide resolved
manifest/io.go Outdated Show resolved Hide resolved
tftpd/handler.go Outdated Show resolved Hide resolved
OGKevin added 2 commits May 27, 2021 15:32
BaseDir allows one to serve files that are stored on the host machine.
Sanitize user input by using Join. Join subsequently calls Clean.
@OGKevin OGKevin force-pushed the add-hostpath-support branch from b075391 to c2011ea Compare May 27, 2021 13:51
Copy link
Contributor Author

@OGKevin OGKevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've renamed it to appendSuffix and applied it to tftpd and httpd, can you have a look?

httpd/handler.go Outdated Show resolved Hide resolved
manifest/io.go Show resolved Hide resolved
manifest/schema.go Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@OGKevin OGKevin force-pushed the add-hostpath-support branch from 4be3a4c to 544bf2f Compare June 4, 2021 07:52
@DSpeichert DSpeichert merged commit 6d6ff5c into DSpeichert:main Jun 5, 2021
@OGKevin OGKevin deleted the add-hostpath-support branch June 5, 2021 19:04
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.

2 participants