Re:Show HN: Serve Static GitHub Pages Locally
by clusmore on Wednesday January 30, 2019 @06:28AM
(#19034248)
Thanks for sharing that, I'll give it a look. I think that http.ServeFile handles content type automatically, because when I test this locally I'm seeing Content-Type in the response headers.
[ Parent
| on HN ]
Re:Show HN: Serve Static GitHub Pages Locally
by souenzzo on Wednesday January 30, 2019 @10:01AM
(#19035528)
Oh. Nice. There is a content-type header. And also the "Content-Length".
The only relevant header that is missing is the "Access-Control-Allow-Origin: *" That comes from github but not from you server.
In 404, github sends Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; img-src data:; connect-src 'self'
Re:Show HN: Serve Static GitHub Pages Locally
by clusmore on Wednesday January 30, 2019 @03:22PM
(#19039036)
Awesome, thanks for noting this. I've raised an issue to address this and investigate other response header differences: https://github.com/CurtisLusmore/ghp/issues/4