Bray-Ali, 38, confirmed that he posted multiple comments in a Voat channel whose title consists of a racial slur and that he criticized the practice of gender-reassignment surgery in another section of the website.
The comments were made about a year and half ago and were first reported by the website LAist.
Bray-Ali told The Times in an interview that he visited Voat because he wanted to "track" the behavior of racists and that his comments don't reflect his values.
He also called Voat a "reprehensible" site and said he regrets making the comments.
"Many of the things that I wrote, I didn't even believe them when I wrote them," Bray-Ali said. "I was trying to have an argument with racists online. I found a place where they go and I tried to spark an argument with them."
Bray-Ali, a bike advocate, is running against Cedillo in the May 16 election to represent District 1, which includes Chinatown, Westlake and several northeast neighborhoods.
A former blogger, Bray-Ali frequently comments on Los Angeles websites under the name ubrayj02.
On Voat, he commented on a video that shows two black women violently attacking one another at a gas station.
Bray-Ali wrote that a woman with an artificial hair extension has an advantage in a fight with a woman whose hair is real, because the "weave" can come off easily if pulled, according to a screen image of Bray-Ali's comment posted by LAist.com.
He also replied to a post in a channel called "Fat People Hate," which mocks overweight people. "If they keep her on her diet, that won't be a long lifetime," he wrote, referring to a story that had been posted about a woman who was sentenced to life in prison for her role in a child rape.
Responding to a post that criticized comments by Golden Globes host Ricky Gervais as "transphobic," Bray-Ali commented that gender reassignment surgery "doesn't seem like something worthy of praise, but instead of being criticized as a shameful excess."
On Wednesday, Bray-Ali said that he'd met transgender individuals during his City Council campaign and that his views had changed in the last year and a half.
"I didn't know what I was talking about; I was ignorant at the time," Bray-Ali said.
Cedillo denounced Bray-Ali's comments Wednesday, saying his opponent "is not fit for public office, and particularly unsuited to represent a district as diverse as Los Angeles' 1st."
Najee Ali, political director of civil rights group National Action Network, hasn't endorsed a candidate in the race and doesn't live in the district, but he said he would organize protests outside Bray-Ali's campaign headquarters until the candidate withdraws from the race.
"I was stunned that anyone would want to participate in that forum," Ali said of Voat.
Voat has been criticized for hosting an alt-right channel. The web server company Host Europe refused in 2015 to work with the site because it was "publicizing incitement of people, as well as abusive, insulting and youth-endangering content," according to the tech news site Venture Beat.
Councilman Mitch O'Farrell endorsed Bray-Ali earlier this month. A spokesman for O'Farrell said the councilman stands by his endorsement, noting that Bray-Ali has apologized for the online comments.
City Council President
"There is nothing funny about this," said Wesson, who has endorsed Cedillo. "Why would you even want to go on a website like that?"
Bray-Ali's apology over the Voat comments come a week after he apologized for comments made in a video posted on YouTube. In the video, he posed a question to the OC Weekly's "Ask a Mexican" columnist: "Dear Mexican: I'd like to know why all my neighbors think that the doorbell is a car horn."