mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
parent
664844b5f5
commit
f6661989af
4 changed files with 15 additions and 15 deletions
|
@ -761,18 +761,18 @@ bool SrsHttpServeMux::path_match(string pattern, string path)
|
|||
return false;
|
||||
}
|
||||
|
||||
SrsHttpCrosMux::SrsHttpCrosMux()
|
||||
SrsHttpCorsMux::SrsHttpCorsMux()
|
||||
{
|
||||
next = NULL;
|
||||
enabled = false;
|
||||
required = false;
|
||||
}
|
||||
|
||||
SrsHttpCrosMux::~SrsHttpCrosMux()
|
||||
SrsHttpCorsMux::~SrsHttpCorsMux()
|
||||
{
|
||||
}
|
||||
|
||||
int SrsHttpCrosMux::initialize(ISrsHttpServeMux* worker, bool cros_enabled)
|
||||
int SrsHttpCorsMux::initialize(ISrsHttpServeMux* worker, bool cros_enabled)
|
||||
{
|
||||
next = worker;
|
||||
enabled = cros_enabled;
|
||||
|
@ -780,7 +780,7 @@ int SrsHttpCrosMux::initialize(ISrsHttpServeMux* worker, bool cros_enabled)
|
|||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
int SrsHttpCrosMux::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
|
||||
int SrsHttpCorsMux::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
|
||||
{
|
||||
// method is OPTIONS and enable crossdomain, required crossdomain header.
|
||||
if (r->is_http_options() && enabled) {
|
||||
|
|
|
@ -443,18 +443,18 @@ private:
|
|||
};
|
||||
|
||||
/**
|
||||
* The filter http mux, directly serve the http CROS requests,
|
||||
* The filter http mux, directly serve the http CORS requests,
|
||||
* while proxy to the worker mux for services.
|
||||
*/
|
||||
class SrsHttpCrosMux : public ISrsHttpServeMux
|
||||
class SrsHttpCorsMux : public ISrsHttpServeMux
|
||||
{
|
||||
private:
|
||||
bool required;
|
||||
bool enabled;
|
||||
ISrsHttpServeMux* next;
|
||||
public:
|
||||
SrsHttpCrosMux();
|
||||
virtual ~SrsHttpCrosMux();
|
||||
SrsHttpCorsMux();
|
||||
virtual ~SrsHttpCorsMux();
|
||||
public:
|
||||
virtual int initialize(ISrsHttpServeMux* worker, bool cros_enabled);
|
||||
// interface ISrsHttpServeMux
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue