How to configure cocoahttpserver with MIME type configuration

This question needs a lot of information about setting up Apple's airplay playback profile.

First, I configured the web server in the iOS application with cocoahttpserver and want to provide access to .mobileconfig, but for this I need to configure the MIME type as application / x-apple-aspen-config. To configure PHP here is the answer

But I am setting up a web server in an iOS application with cocoahttpserver, and I am not familiar with this configuration. Therefore, the question of looking for a professional offers this.

+4
source share
1 answer

The best way is to inherit one of the HTTPResponse classes and the ovverride httpHeaders method.

Take a look at this question to find out how this is done: Change the name of the download file in Cocoahttpserver

The only difference is that you need to set the "Content-Type" header instead of the "Content-Disposition"

+1
source

All Articles