code-server icon indicating copy to clipboard operation
code-server copied to clipboard

Query parameters break IDE

Open garagatyi opened this issue 7 years ago • 16 comments

I tried to use code-server in a container on Openshift inside of Che as an alternative to Eclipse Theia. Che adds query parameter ?uid=213488 to ensure that response is not cached and updates of the IDE web page are properly managed. But code-server doesn't load because of this query parameter. Instead error is returned Cannot GET / with error code 404. Changing query parameter name doesn't help. Could you allow passing query parameters to the IDE, so caching prevention would work? Actually, it might be a good idea to prevent caching by default because some users would want to be able to run new version of the code-server in a docker container and not suffer from cached page issue.

garagatyi avatar Mar 13 '19 10:03 garagatyi

From what I can understand, the http server they coded this at only listens to / so any query params can break the implementation quite easily.

EDIT: This is also a issue when running it in Cloud Shell as well.

sr229 avatar Mar 13 '19 10:03 sr229

CC any coder maintainer to mark this as a bug and not a feature thanks

sr229 avatar Mar 13 '19 13:03 sr229

This is actually a blocker for me. I'm using a reverse-proxy which identifies origin by a query param.

nir0s avatar Apr 13 '19 19:04 nir0s

Ah. I guess we'll need to add query params when we make requests.

kylecarbs avatar Apr 24 '19 23:04 kylecarbs

@kylecarbs I think this is high priority since we have a large audience that has reverse proxies. This would be a pain in the ass for them (and for integrators who want to add this toolchain to their own solution)

sr229 avatar Apr 25 '19 10:04 sr229

I got it running on my environment with a hack

Screen Shot 2019-05-15 at 12 25 39 AM

Basically, I have code-server running outside of Eclipse Che, and created a stack with a docker image with a simple HTTP server in python redirecting to code-server. It is not a secure environment but this is my internal network and is just me 👍

grenovales avatar May 15 '19 04:05 grenovales

sounds like a acceptable workaround but this needs to be fixed upstream

sr229 avatar May 15 '19 12:05 sr229

sounds like a acceptable workaround but this needs to be fixed upstream

agreed

grenovales avatar May 15 '19 14:05 grenovales

Any progress?

jeasonstudio avatar Jul 05 '19 03:07 jeasonstudio

I have not heard from our folks at Coder but I'll go ahead CC one so they'll be updated about the need for this fix.

CC @deansheather

sr229 avatar Jul 05 '19 11:07 sr229

I got it running on my environment with a hack

Screen Shot 2019-05-15 at 12 25 39 AM

Basically, I have code-server running outside of Eclipse Che, and created a stack with a docker image with a simple HTTP server in python redirecting to code-server. It is not a secure environment but this is my internal network and is just me

Would appreciate it if you could share your exact implementation. Thanks.

nir0s avatar Jul 07 '19 09:07 nir0s

I'll try to make a fix for this tomorrow.

deansheather avatar Jul 07 '19 09:07 deansheather

Any updates here?

nir0s avatar Aug 21 '19 17:08 nir0s

GH-857 should fix this, we use query params in this as well

sr229 avatar Aug 21 '19 22:08 sr229

GH-857 is merged but I'll be working closely with the Che team to see if we can find show-breaking bugs before we introduce it to Che.

sr229 avatar Sep 12 '19 18:09 sr229

If this still occurs, please feel free to reopen.

nhooyr avatar Jan 28 '20 01:01 nhooyr