We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'npm start' works without issues when not using containers, but 401 when containerized. Three files of project are posted below:
const spauth = require("node-sp-auth"); const request = require("request-promise"); spauth .getAuth("http://20.107.64.34", { username: "SP2016-FARM-ADMIN", password: "njdfignds4<LP_", domain: "SOCAFRICA", }) .then((data) => { let headers = data.headers; headers["Accept"] = "application/json;odata=verbose"; let requestOpts = data.options; requestOpts.json = true; requestOpts.headers = headers; requestOpts.url = "http://20.107.64.34/_api/web"; request.get(requestOpts).then((response) => { console.log(response.d.Title); }); });
{ "name": "spnodeauth-docker", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "start": "node index.js" }, "keywords": [], "author": "Mike Chan", "license": "ISC", "dependencies": { "node-sp-auth": "^3.0.7", "request-promise": "^4.2.6" } }
FROM node:16 WORKDIR /app COPY package*.json ./ RUN npm install COPY . . CMD ["npm", "start"]
The text was updated successfully, but these errors were encountered:
@chanm003 Did you discover a solution?
Sorry, something went wrong.
Maybe something related to windows? As the a can't repro a similar ticket issue (works for me).
Does it work for you outside Docker?
UPD: I see this ticket is old, unlikely we'll get a response.
No branches or pull requests
'npm start' works without issues when not using containers, but 401 when containerized. Three files of project are posted below:
index.js
package.json
Dockerfile
The text was updated successfully, but these errors were encountered: