Skip to content

Commit 72e6dfe

Browse files
authored
Change API root endpoint to GET method (#1833)
* Change root endpoint to GET method This is just a test.. for some reason HEAD is not allowed in staging although it works on edge * Use GET instead head Because the endpoint changed
1 parent e20d6c4 commit 72e6dfe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Elastic.Documentation.Site/Assets/web-components/SearchOrAskAi/SearchOrAskAiButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const SearchOrAskAiButton = () => {
3333
const { data: isApiAvailable } = useQuery({
3434
queryKey: ['api-health'],
3535
queryFn: async () => {
36-
const response = await fetch('/docs/_api/v1/', { method: 'HEAD' })
36+
const response = await fetch('/docs/_api/v1/')
3737
return response.ok
3838
},
3939
staleTime: 5 * 60 * 1000, // 5 minutes

src/api/Elastic.Documentation.Api.Infrastructure/MappingsExstension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static class MappingsExtension
1515
{
1616
public static void MapElasticDocsApiEndpoints(this IEndpointRouteBuilder group)
1717
{
18-
_ = group.MapMethods("/", [HttpMethods.Head], () => Results.Empty);
18+
_ = group.MapGet("/", () => Results.Empty);
1919
MapAskAiEndpoint(group);
2020
MapSearchEndpoint(group);
2121
}

0 commit comments

Comments
 (0)