加入自定义响应头
This commit is contained in:
@@ -190,7 +190,13 @@ class ShelfWebServer implements WebServer {
|
||||
headers["Access-Control-Expose-Headers"] =
|
||||
"Content-Type,X-Span-ID,X-Trace-ID,token";
|
||||
headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
var uct = headers["user-content-type"];
|
||||
if (uct != null) {
|
||||
headers.remove("user-content-type");
|
||||
headers["content-type"] = uct;
|
||||
} else {
|
||||
headers["content-type"] = contentType;
|
||||
}
|
||||
|
||||
return response.change(headers: headers);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user