My son only takes his naps on the swing, is this dangerous?

So my baby is two months and no matter what I can’t get him to nap anywhere besides his swing. He won’t even nap in my arms or a sling or his bed. He sleeps at night time in his bed though. Online said to limit time in a swing as it’s dangerous. He sleeps about 6 hours in the swing in a day. Is it true that it’s dangerous?? 😫