# We have to differentiate two cases to mimic the ws-proxy behavior: # - requests to the IDE frontend: redirect to "/start?not_found=true#..." # - everything else: respond with 404 # We have to keep the port matcher because it's more specific than the workspace id matcher below @workspace_port header_regexp host Host ^(?P[0-9]{2,5})-(?P[a-z0-9][0-9a-z\-]+).ws(?P-[a-z0-9]+)?.{$GITPOD_DOMAIN} handle @workspace_port { respond "Not found" 404 } @workspace header_regexp host Host ^(?P[a-z0-9][0-9a-z\-]+).ws(?P-[a-z0-9]+)?.{$GITPOD_DOMAIN} handle @workspace { redir https://{$GITPOD_DOMAIN}/start/?not_found=true#{re.host.workspaceID} temporary } respond "Not found" 404