Both are correct, and they have practically the same meaning.
By themselves, "pro"pro and "por"por have quite different meanings.
Basically, "pro"pro means "'because of"' and "por"por means "'for"'.
Pretty much all the meanings of English "for" can be expressed with "por"por, with the exception of the meaning of "because of": If you want to say "for that reason", you have to say "pro tiu kialopro tiu kialo", not "por tiu kialopor tiu kialo".
Zamenhof used both "pro"pro and "por"por after "danki"danki, with no recognizable difference in meaning. Both prepositions can be justified after "danki"danki: Using "pro"pro makes sense, because in a sense what you are thanking for is the cause of your thanking. Using "por"por makes sense despite the fact that "por"por cannot mean "because of"'because of', as "por"por can mean something like "in exchange for"'in exchange for': You can say "Mi pagis por la biero""Mi pagis por la biero" ("I payed for the beer"'I payed for the beer'), and analogously you can say "Mi dankis por la biero""Mi dankis por la biero".
So both options are equally good, and they mean the same. Which one you choose to use is just a question of personal taste.