serve static assets on urls with file extension #538
No reviewers
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
dependencies
Epic
good first issue
hacktoberfest
help wanted
icebox
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
Osprey
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
resilience
Tom's Wishlist
type: bug
type: discussion
type: error handling
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/spee.ch#538
Loading…
Reference in a new issue
No description provided.
Delete branch "515-showlite-serves-asset"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR updates the routes so that they break into two categories:
show
route, meaning that this route returns an html document with meta tags, etc. These routes are 'dynamic' in that they can also serve just the asset (video or image) if the request headers indicate this. Example:spee.ch/a/apple
orspee.ch/apple
.serve
route, meaning the route will return the asset (video, image, etc. ) file directly. These routes arestatic
, meaning they will return only the asset and not an html document regardless of the request headers. Examples:spee.ch/a/apple.jpg
orspee.ch/apple.jpg
.What are the headers required to serve the static content on a url without a file extention?
@tzarebczan it assumes the asset is requested if the
accept
header includesimage/
orvideo
and nottext/html
. This could be added too or changed easily. Like if we want to check for the app by looking forLBRY/
in theuser-agent
.Minor comments, nothing holding a merge back :)
@ -0,0 +27,4 @@
}
if (channelName) {
return "".concat(host, "/").concat(channelName, ":").concat(certificateId, "/").concat(name);
use template strings?
e.g.
@ -0,0 +27,4 @@
}
if (channelName) {
return "".concat(host, "/").concat(channelName, ":").concat(certificateId, "/").concat(name);
This is the babel transpiled code :)
@ -0,0 +27,4 @@
}
if (channelName) {
return "".concat(host, "/").concat(channelName, ":").concat(certificateId, "/").concat(name);
once I merge the www.spee.ch and spee.ch repos we should be able to keep this out of version control