.net - How to make ServiceStak service internal access only -
i want make services access internal only. there way global set restrictattribute affect services ?
the easiest way restrict services use globalrequestfilter
, e.g:
globalrequestfilters.add((req, res, dto) => { if ((requestattributes.internalnetworkaccess & req.requestattributes) == 0) { res.statuscode = (int)httpstatuscode.forbidden; res.statusdescription = "external requests forbidden"; res.endrequest(); } });
Comments
Post a Comment