Every policy of insurance against liability under "The Workmen's Compensation Act of nineteen hundred and fifteen," and acts amendatory thereof or supplementary thereto, or under "The Pennsylvania Occupational Disease Act of nineteen hundred and thirty-nine," and acts amendatory thereof or supplementary thereto, shall contain the agreement of the insurer to pay all compensation and provide all medical, surgical, and hospital attendance for which the insured employer may become liable under such acts during the term of such insurance, and the further agreement that, as between the insurer and any claimant under such acts, notice to the employer or the employer's knowledge of an accident or injury or disability caused by occupational disease constituting the basis of a claim under such acts shall be notice to and knowledge of the insurer. Such agreements shall be construed to be a direct promise to the injured employe or to the dependents of a deceased employe having a claim under such acts, and shall be enforceable by action brought in the name of such injured employe or in the name of such dependents. Such obligation shall not be affected by any default of the insured, after an accident or after disability caused by occupational disease, in the payment of premiums or in the giving of any notices required by such policy or otherwise.
40 P.S. § 811