PDF-Serialisierung erfolgt jetzt direkt auf Razor Page - Sicherheitsverbesserung
Externer Fetch-Vorgang entfernt, PDF-Inhalt aus Sicherheitsgründen direkt auf der Razor Page serialisiert.
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
* @param {any} envelopeKey
|
||||
*/
|
||||
async getEnvelope(envelopeKey) {
|
||||
console.log("getEnvelope")
|
||||
return this.getRequest(`/api/envelope/${envelopeKey}`)
|
||||
.then(this.wrapJsonResponse.bind(this))
|
||||
}
|
||||
@@ -17,7 +16,6 @@
|
||||
* @param {any} json
|
||||
*/
|
||||
async postEnvelope(envelopeKey, documentId, json) {
|
||||
console.log("postEnvelope")
|
||||
return this.postRequest(`/api/envelope/${envelopeKey}?index=${documentId}`, json)
|
||||
.then(this.wrapJsonResponse.bind(this))
|
||||
}
|
||||
@@ -28,7 +26,6 @@
|
||||
* @param {any} documentId
|
||||
*/
|
||||
async getDocument(envelopeKey, documentId) {
|
||||
console.log("getDocument", `/api/document/${envelopeKey}?index=${documentId}`)
|
||||
return this.getRequest(`/api/document/${envelopeKey}?index=${documentId}`)
|
||||
.then(this.wrapBinaryResponse.bind(this))
|
||||
}
|
||||
@@ -38,7 +35,6 @@
|
||||
* @param {any} envelopeKey
|
||||
*/
|
||||
async openDocument(envelopeKey) {
|
||||
console.log("openDocument")
|
||||
return this.postRequest(`/api/document/${envelopeKey}`, {})
|
||||
.then(this.wrapJsonResponse.bind(this))
|
||||
}
|
||||
@@ -66,7 +62,6 @@
|
||||
*/
|
||||
getCSRFToken() {
|
||||
const token = document.getElementsByName('__RequestVerificationToken')[0].value
|
||||
console.log(token)
|
||||
return { 'X-XSRF-TOKEN': token }
|
||||
}
|
||||
|
||||
@@ -143,10 +138,6 @@
|
||||
async wrapResponse(response, responseHandler) {
|
||||
let wrappedResponse
|
||||
|
||||
console.log("Handling response from", response.url)
|
||||
console.log("Status", response.status)
|
||||
console.log(response)
|
||||
|
||||
if (response.status === 200) {
|
||||
const data = await responseHandler(response)
|
||||
wrappedResponse = new WrappedResponse(data, null)
|
||||
@@ -157,8 +148,6 @@
|
||||
wrappedResponse = new WrappedResponse(null, null)
|
||||
}
|
||||
|
||||
console.log("Wrapped response", wrappedResponse)
|
||||
|
||||
return wrappedResponse
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user