.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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -