Gitpod: Support opening Gitpod using HTTP Referrer

Created on 25 Sep 2018  路  6Comments  路  Source: gitpod-io/gitpod

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)

enhancement

Most helpful comment

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

All 6 comments

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.

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

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.

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.

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kreyren picture Kreyren  路  3Comments

nisarhassan12 picture nisarhassan12  路  3Comments

kuniss picture kuniss  路  3Comments

LezaiNiubi picture LezaiNiubi  路  3Comments

hidehiro98 picture hidehiro98  路  3Comments