Add header to enable CORS, add missing function parameter.

We need this header to enable running the server on another host or port.