General answer: no, you should not include answer in the question or rewrite the question to make answers invalid. If you found that a particular answer not working in your case feel free to downvote the answer and/or provide a comment (as you did in this case).
There are sometimes cases when answers clearly offer random suggestion ("try this") or pick a route that already somewhat mentioned (as either tried or prohibited) - in these cases you may try to edit in that information in the question, but make sure to not invalidate existing answers to the question as asked. It may be better to finalize the existing by voting/commenting/accepting answers and ask new separate question with more narrow scope /clear restrictions.
For your specific case - it looks like the answer indeed answers the question as asked and your are (as a web developer) expected to have good understanding of the "same origin" policy and all related CSRF issues. It is somewhat rude to assume that the author of the question is incapable of understanding such basics things related to their field or unable to do research on their own. I don't think in this particular case editing any information from the answer to the question would be appropriate, you may want to ask a separate question (but make sure to do your research on the subject first - there are likely one or two articles about CSRF).
Please note that answers normally target the level of understanding demonstrated in the question. In this case you as the author has shown a good level of understanding of the field via good attempt to quite a complex task - so don't expect handholding in the answer.