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

Fix README Handle path #4

Merged
merged 1 commit into from
Feb 22, 2023
Merged

Fix README Handle path #4

merged 1 commit into from
Feb 22, 2023

Conversation

benhoyt
Copy link
Contributor

@benhoyt benhoyt commented Feb 20, 2023

Thanks for this package! I was surprised embed didn't do something like this by default, and then I found the issue related to that that was closed. In any case, this PR just fixes a typo in the http.Handle path in the example in the README.

The main fix here is to add a trailing "/" to the Handle path -- without the trailing slash, Handle only handles the exact path "/assets", not "/assets/*".

The StripPrefix path doesn't strictly need the trailing slash, but it's less confusing if they match.

Also fix the <script> tag so it actually works (though I realize that's not the point of this example).

The main fix here is to add a trailing "/" to the `Handle` path -- without the trailing slash, `Handle` only handles the exact path "/assets", not "/assets/*".

The `StripPrefix` path doesn't strictly need the trailing slash, but it's less confusing if they match.

Also fix the `<script>` tag so it actually works (though I realize that's not the point of this example).
@benbjohnson
Copy link
Owner

Thanks!

@benbjohnson benbjohnson merged commit 0bd452f into benbjohnson:main Feb 22, 2023
@benhoyt benhoyt deleted the patch-1 branch February 26, 2023 20:42
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