It is a fair question, and the expensive one. Casablanca is an adaptation: Warner Bros. bought Everybody Comes to Rick’s unproduced, for a record $20,000 ↗, from Murray Burnett and Joan Alison, who wrote it in 1940. Famous screen lines often turn out to belong to the novelist or playwright, with the film taking the credit.
As far as the record shows, this one does not. The play is set entirely inside the café and ends with Rick sending Lois and Laszlo to the airport ↗ — the airfield farewell that contains this line has no counterpart on stage, and the Ilsa character there is a different creation, an American named Lois Meredith. That is an observation about the play’s structure rather than a finding from any source that has collated the two texts word for word; the play’s script was not available in searchable form to check directly, so the line is credited to the film without claiming the play has been ruled out sentence by sentence.
Burnett never accepted the small share of glory. He sued unsuccessfully for $6.5 million ↗, contending the play had provided the heart of the film, and Koch — rereading it at 89 — allowed that it had given the movie “the spine.” Neither claim reaches this particular sentence.