Never use spray polyurethane foam around fire or flame. The chemical composition of foam means that any one-component foam has the potential to combust.