rgrove / rawgit

Served files from raw.githubusercontent.com, but with the correct content types. No longer actively developed.
https://rawgit.com
MIT License
2.39k stars 488 forks source link

Allow subdomains to specify the Github user to provide isolated origins #152

Closed fabio-looker closed 7 years ago

fabio-looker commented 7 years ago

Currently, if I have an HTML page that uses localStorage, any other HTML page uploaded to Github could access data that a user enters on my HTML page.

If we simply allowed URLs of the form http(s)://user.rawgit.com/repo/branch/* (which could be in addition to the current routing scheme), then each user could have their own isolated origin.

I can work on the code and submit a pull request, if you like the idea and would be able to add the right wildcard DNS entry & wildcard SSL.

rgrove commented 7 years ago

Thanks for the suggestion. I agree that isolated per-user origins would be a neat feature, but there are a number of reasons why I'm not likely to add this to RawGit:

But perhaps the biggest reason is that RawGit isn't intended to be a static site hosting platform. RawGit is a static asset proxy that's intended to make development and prototyping easier.

There are much better solutions for hosting static websites. Some of them, like GitHub Pages, are even free and tightly integrated with GitHub, so I don't see this as an area where RawGit is needed.

fabio-looker commented 7 years ago

And now I know about GitHub Pages! Thanks :)