diff --git a/coderd/apidoc/docs.go b/coderd/apidoc/docs.go index 2ad130318dcbb..ee9e6db267da3 100644 --- a/coderd/apidoc/docs.go +++ b/coderd/apidoc/docs.go @@ -149,6 +149,7 @@ const docTemplate = `{ ], "summary": "Get applications host", "operationId": "get-applications-host", + "deprecated": true, "responses": { "200": { "description": "OK", diff --git a/coderd/apidoc/swagger.json b/coderd/apidoc/swagger.json index e2a593c1a415c..40801470b3a95 100644 --- a/coderd/apidoc/swagger.json +++ b/coderd/apidoc/swagger.json @@ -121,6 +121,7 @@ "tags": ["Applications"], "summary": "Get applications host", "operationId": "get-applications-host", + "deprecated": true, "responses": { "200": { "description": "OK", diff --git a/coderd/workspaceapps.go b/coderd/workspaceapps.go index cec40eed5650d..1f1224e028d7a 100644 --- a/coderd/workspaceapps.go +++ b/coderd/workspaceapps.go @@ -27,6 +27,7 @@ import ( // @Tags Applications // @Success 200 {object} codersdk.AppHostResponse // @Router /applications/host [get] +// @Deprecated use api/v2/regions and see the primary proxy. func (api *API) appHost(rw http.ResponseWriter, r *http.Request) { host := api.AppHostname if host != "" && api.AccessURL.Port() != "" { diff --git a/site/src/contexts/ProxyContext.tsx b/site/src/contexts/ProxyContext.tsx index eef89b31ef239..c89ae309aecc8 100644 --- a/site/src/contexts/ProxyContext.tsx +++ b/site/src/contexts/ProxyContext.tsx @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query" -import { getApplicationsHost, getWorkspaceProxies } from "api/api" +import { getWorkspaceProxies } from "api/api" import { Region } from "api/typesGenerated" import { useDashboard } from "components/Dashboard/DashboardProvider" import { @@ -70,7 +70,6 @@ export const ProxyProvider: FC = ({ children }) => { onSuccess: (resp) => { setAndSaveProxy(proxy.selectedProxy, resp.regions) }, - enabled: experimentEnabled, }) const setAndSaveProxy = ( @@ -93,35 +92,20 @@ export const ProxyProvider: FC = ({ children }) => { setProxy(preferred) } - // ******************************* // - // ** This code can be removed ** - // ** when the experimental is ** - // ** dropped ** // - const appHostQueryKey = ["get-application-host"] - const { - data: applicationHostResult, - error: appHostError, - isLoading: appHostLoading, - isFetched: appHostFetched, - } = useQuery({ - queryKey: appHostQueryKey, - queryFn: getApplicationsHost, - enabled: !experimentEnabled, - }) - return (