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

GitHub Codespaces #1215

Open
tomocrafter opened this issue Aug 28, 2020 · 9 comments
Open

GitHub Codespaces #1215

tomocrafter opened this issue Aug 28, 2020 · 9 comments
Labels
bug 🐛 Something isn't working

Comments

@tomocrafter
Copy link

tomocrafter commented Aug 28, 2020

GitHub's new feature codespaces brings function to access to local server via https://<randomized id>.apps.codespaces.githubusercontent.com/. Therefore, We need to exclude it from apply list.

  • Browser: Brave Browser
  • Operating System: Windows 10 Pro 2004
  • Link to page with the issue: https://<randomized id>.apps.codespaces.githubusercontent.com/
  • Screenshot:
    image
@tomocrafter tomocrafter added the bug 🐛 Something isn't working label Aug 28, 2020
@the-j0k3r
Copy link
Member

You can simply just use Stylus feature to do the job for you without us needing to do anything special.

generica

So the job really is already done for the 1% of users coming across whatever the issue is.

@silverwind
Copy link
Member

I guess we could exclude it our the regex if it really looks that bad. Does it come with a built in dark theme?

@xt0rted
Copy link
Member

xt0rted commented Aug 28, 2020

Codespaces is just VS Code in the browser, it's fully themeable just like the desktop version. @tomocrafter can correct me on this, but I believe what they're doing is opening a port from the VM to run their application through and it's being themed with GHD when it shouldn't be.

@silverwind
Copy link
Member

silverwind commented Aug 29, 2020

Can someone with access to Codespaces test if replacing

domain("githubusercontent.com")

with

regexp("^https?://(?:(?!codespaces).)*githubusercontent\\.com.*$")

works?

https://regex101.com/r/uA8HYl/2

@the-j0k3r
Copy link
Member

The regex is just a stop gap, via stylus you can ignore some pages anyway as I detailed above.

@silverwind
Copy link
Member

If that random part of the hostname changes often, it would be a burden.

@xt0rted
Copy link
Member

xt0rted commented Aug 30, 2020

There's 3 urls I'm seeing when using port forwarding.

The first initiates authentication using the format https://github.com/codespaces/auth/{guid}?port={forwarded-port}&cid=.... This is themed but only shows for a split second in a new window so I couldn't get a copy of the html/css it's using.

The second is the auth redirect which uses https://auth.apps.codespaces.githubusercontent.com/authenticate-codespace/.... This does have a small loading animation but isn't themed.

image

The third url is the one that your application loads with. The subdomain for this one changes for each vm and forwarded port (if you forward 10 ports you get 10 different subdomains). These use the format https://{guid}-{forwarded-port}.apps.codespaces.githubusercontent.com/.

Replacing both occurrences of domain("githubusercontent.com") removes GHD as you'd expect.

@meme
Copy link

meme commented Sep 19, 2020

Looks like it is now https://$USERNAME-$REPO-$HASH.github.dev/, so *.github.dev should do the trick.

@xt0rted
Copy link
Member

xt0rted commented Sep 19, 2020

github.dev is where the IDE lives now, but port forwarding still goes through https://7f2c8767-c59c-43b5-9208-ea63ef183aec-8080.apps.codespaces.githubusercontent.com/, at least for one of my existing environments (created July 28th), not sure if new ones are different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants