Can you line glass bakeware (pyrex) with foil for baking?

the recipe I’m using for brownies says to line the pan w/ foil, but I wasn’t sure about putting foil in a glass dish.