How to include bibliography in table of contents

I’ve created both a table of contents and a bibliography in my Writer document.

Since the TOC runs off of styles and the bibliography heading has a different style, how do I get the bibliography to show up in the table of contents.

There is a much much better way than either the accepted answer or the comment beneath it. By default the ToC will pick up headings. So select Edit index on your Bibliography index, go to the Styles tab and find Title [Bibliography Heading]. THIS is the problem, the incorrect style or better said a style that won’t be picked up by ToC. I’ve changed the style by the left arrow (<) for the Title so it was Title [Heading 1] and then ToC picked up bibliography just fine without any manual changes to the index. This makes it possible to refresh bibliography without the need to re-create the heading for ToC.

As a hack, you can remove the protection against manual changes and add it yourself - but I agree, this should be something you could set - and it should be added as default.

I found this answer extremely unsatisfying. To the people who found this place and hate this awnser too: I propose an alternative, Right click the bibliography, select edit, set the title to nothing. After this you can add the title above the bibliography as regular text and give it the ‘Heading 1’ style. It will then show up in your TOC and your bibliography can stay write-protected.