Comments (4)
Hey @johnnliu,
Last months sp-rest-proxy
received a lot of new features.
I had no chance to document them all. In a few words, almost any request can be forwarded via proxy, including JSOM, batch API (for SPO and 2016) and static content. SharePoint pages can be even opened in proxy's hostname.
Also proxy got a new mode for socket server and client which allows target to SharePoint server
in NAT network without VPN or external IP.
Also, I got a chance to test node-sp-auth's NTLM authentication with SP 2010, I was surprised, but it works like a charm.
I've checked some request to /_vti_bin/listdata.svc
: getting list of lists, getting list's items, creating an item with:
var listName = 'Test';
$.ajax({
url: "http://localhost:8080/sites/help/_vti_bin/listdata.svc/" + listName,
type: "POST",
processData: false,
contentType: "application/json;odata=verbose",
data: JSON.stringify({ "Title": "test" }),
headers: {
"Accept": "application/json;odata=verbose"
},
success: function(data) {
console.log(data.d);
},
error: function(err) {
console.log(err);
}
});
It works with the combination of sp-rest-proxy and SharePoint 2010 now.
Theoretically, even multipart batch request should work (POST http://contoso/sites/sharepointlist/_vti_bin/listdata.svc/$batch HTTP/1.1).
I'm not going to add full support for 2010 and integration tests, at least for now, but I have a feeling that most scenarios (SOAP, legacy REST, JSOM, static content) with SP 2010 should work as well.
It would be great if you could take a look and test your scenarios with SharePoint 2010 and the latest version of sp-rest-proxy.
Thanks!
Closing this issue, but feel free to reopen if anything won't work.
from sp-rest-proxy.
I only just saw this. will try hopefully soon.
from sp-rest-proxy.
Hi John,
Interesting. What about authentication?
I have never tried node-sp-auth
with 2010.
I don't even have SP 2010 environment nowadays, to test it right away.
Actually, /_api
shouldn't be changed to /_vti_bin
. It's possible to have multiple routers, just like in the case of SOAP implementation, when app.use('*/_vti_bin', _self.routers.apiSoapRouter);
routes to a specific request builder depending on URI pattern.
need to think a bit more about how to support this properly, do you want to add a flag to config to specify which SharePoint the user is running?
Yep. We got to think more.
Base implementation can stay as it is, as there was no /_api
endpoint alias in SP 2010, but /_vti_bin
part should be thought in some way to deal with ASMX's and SVC's simultaneously.
Also, I'm not sure about authentication.
--
Andrew
from sp-rest-proxy.
Stabbed at this a bit more today - I was able to use apiSoapRouter to proxy POST requests to custom .svc as well. For this on-premises customer I had many REST Soap services deployed which I'm proxy'ing. Had to tell the apiSoapRouter (which auth with NTLM) to not parse body as XML and keep it as JSON instead.
There is still the issue of scrubbing the page for a FormDigest for listdata.svc. As there is no _api/contextinfo. I think this is a task that should be done by in node-sp-auth though.
Ultimately this might just be too crazy.
I've hacked the index.js to pieces I feel bad.
from sp-rest-proxy.
Related Issues (20)
- Identical requests - succeeding and failing HOT 4
- Can this react app be deployed as a web app on to a windows server so that users can access the app outside of the server ? HOT 6
- Host "sp-rest-proxy" as an independent web-app on Azure or pass authentication in configs to be used in CI/CD pipeline HOT 1
- Can this proxy be used when the host SP environment (on prem) has a "strict-origin-when-cross-origin" HTTP referrer policy? HOT 3
- sharepoint MFA bypass HOT 2
- [Feature query] Can the proxy be made to connect to multiple sites? HOT 1
- sp-rest-proxy with sharepointplus HOT 10
- POST request fails when calling the proxy (adding extra path to sharepoint request) HOT 5
- Proxy Error: Cannot read properties of null (reading 'toString') (see more in sp-rest-proxy console) HOT 4
- Version 3.3.4 broken for OnpremiseUserCredentials HOT 5
- Cannot read properties of null (reading 'toString') HOT 3
- On Demand - cannot read properties of null / childprocess.spawnsync EONENT Error HOT 2
- Proxy approach for Azure Active Directory HOT 2
- Typescript import HOT 1
- Setting siteUrl programatically HOT 4
- sp-rest-proxy does not work with Node 18.16.0 (current LTS) HOT 5
- Thank you HOT 1
- Docker HOT 2
- JSOM using sp-rest-proxy / clarification needed HOT 9
- 401 When Running in Docker HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sp-rest-proxy.