1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine the cros of api for flv

This commit is contained in:
winlin 2016-12-15 14:10:02 +08:00
parent 3df8f11884
commit f30b3073a2
4 changed files with 83 additions and 30 deletions

View file

@ -442,6 +442,26 @@ private:
virtual bool path_match(std::string pattern, std::string path);
};
/**
* The filter http mux, directly serve the http CROS requests,
* while proxy to the worker mux for services.
*/
class SrsHttpCrosMux : public ISrsHttpServeMux
{
private:
bool required;
bool enabled;
ISrsHttpServeMux* next;
public:
SrsHttpCrosMux();
virtual ~SrsHttpCrosMux();
public:
virtual int initialize(ISrsHttpServeMux* worker, bool cros_enabled);
// interface ISrsHttpServeMux
public:
virtual int serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
};
// for http header.
typedef std::pair<std::string, std::string> SrsHttpHeaderField;