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

Support opening Gitpod using HTTP Referrer #78

Closed
trieloff opened this issue Sep 25, 2018 · 6 comments
Closed

Support opening Gitpod using HTTP Referrer #78

trieloff opened this issue Sep 25, 2018 · 6 comments
Labels
type: feature request New feature or request

Comments

@trieloff
Copy link

For my example project (https://github.com/trieloff/helix-helpx/blob/master/README.md) I've added an "edit in gitpod.io" button to the README.md.

While it is nice to have, the URL right now is hardcoded:

[![Gitpod](https://img.shields.io/badge/edit%20in-gitpod.io-blue.svg)](https://gitpod.io#https://github.com/trieloff/helix-helpx)

It would be great if I could just link to https://gitpod.io/referrer and GitPod would open the referring repository, so that the button could work across forks (and give you an easy way to ensure viral distribution)

@geropl
Copy link
Member

geropl commented Sep 25, 2018

That'd be a cool feature. We thought in the same direction but discovered that GitHub does not send URL paths but a plain https://github.com instead.

@trieloff
Copy link
Author

Hm. Seems to be browser-dependent. I tried it in Safari (read Referrer using Javascript, not HTTP header) and got the full URL.

@svenefftinge
Copy link
Member

Hm. Seems to be browser-dependent. I tried it in Safari (read Referrer using Javascript, not HTTP header) and got the full URL.

Oh, that's cool. Let's re-check for firefox and chrome.

@svenefftinge svenefftinge added the type: feature request New feature or request label Sep 26, 2018
@geropl
Copy link
Member

geropl commented Sep 26, 2018

I did a quick test with a README.md on a GitHub repository and console.log(document.referrer) (Chromium and Firefox). Both returned https://github.com/, which is correct as github.com responds with the Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin.

@svenefftinge
Copy link
Member

Closing this as we don't seem to get the needed information :(

@svenefftinge
Copy link
Member

Good news! It seems like GH have changed the referrer-policy. See #688

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants