Use Regex in --proxy-domain #6933
              
                Unanswered
              
          
                  
                    
                      sevetseh28
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment
-
| Oh yeah hmm this is an interesting edge case.  We escape the value so it is not possible to use regex in  If that does not work, maybe we will need to add an option to specify a regex.   | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! Im having an issue with the
{{port}}-{{host}}value in proxy domain arg.My host looks like:
[a-z0-9]{8}-hello.example.netSo an example is
1a2b3c4d-hello.example.net.However,I have issues when the first component is all digits because it interprets it as the port:
12345678-hello.example.netand I'm using the{{port}}-{{host}}in proxy domain.I looked at the source code here https://github.com/coder/code-server/blob/main/src/node/routes/domainProxy.ts
but I'm not entirely sure if regex are supported there. I see that the issue is that it will transform it into
(\d+)-(.+)regex, which is wrong for my case (I need something more strict).I tried
{{port}}-[a-z0-9]{8}-hello.example.netbut then when accessing the IDE I got a message :Thank you!
Beta Was this translation helpful? Give feedback.
All reactions