Firefox keeps asking if I want to open file with a certain program
That behavior is usually because the file is served with a ContentDisposition: attachment response header. This is a long-standing bug in Firefox, due to an obstinate misinterpretation/misapplication of certain standards by Firefox developers. You will never stop the madness until that changes, and Mozilla fixes the bug. See for instance: https://bugzilla.mozilla.org/show_bug.cgi?id=453455.