Drain the crushed pineapple in a fine mesh strainer and press gently to remove excess liquid. Spread on paper towel and blot lightly. Set aside.
In a medium bowl, whisk together flour, cornstarch, baking powder, baking soda, and salt.
In a large bowl, beat softened butter, granulated sugar, and brown sugar for 2 minutes until fluffy.
Beat in the egg and egg yolk until fully combined. Mix in vanilla extract.
Add the dry ingredients to the wet ingredients in two additions, mixing just until combined.
Fold in the drained pineapple and coconut (if using).
Cover and refrigerate the dough for 30 to 45 minutes.
Preheat oven to 350°F (175°C). Line baking sheets with parchment paper.
Scoop dough into 1½ tablespoon portions and place 2 inches apart on the baking sheet.
Bake for 10 to 12 minutes, until edges are set and lightly golden and centers still look soft.
Cool on the baking sheet for 5 minutes, then transfer to a wire rack to cool completely.
If glazing, whisk glaze ingredients until drizzle-thick, then drizzle over fully cooled cookies. Let set 20 to 30 minutes.