Fix excluding credentials in permalink
This commit is contained in:
@@ -1381,9 +1381,9 @@ export default {
|
|||||||
"url",
|
"url",
|
||||||
"path",
|
"path",
|
||||||
!this.urlExcludes.auth ? "auth" : null,
|
!this.urlExcludes.auth ? "auth" : null,
|
||||||
"httpUser",
|
!this.urlExcludes.httpUser ? "httpUser" : null,
|
||||||
"httpPassword",
|
!this.urlExcludes.httpPassword ? "httpPassword" : null,
|
||||||
"bearerToken",
|
!this.urlExcludes.bearerToken ? "bearerToken" : null,
|
||||||
"contentType"
|
"contentType"
|
||||||
].filter((item) => item !== null).map(item => flat(item));
|
].filter((item) => item !== null).map(item => flat(item));
|
||||||
let deeps = ["headers", "params"].map(item => deep(item));
|
let deeps = ["headers", "params"].map(item => deep(item));
|
||||||
@@ -1531,8 +1531,15 @@ export default {
|
|||||||
this.editRequest = {};
|
this.editRequest = {};
|
||||||
},
|
},
|
||||||
setExclude (excludedField, excluded) {
|
setExclude (excludedField, excluded) {
|
||||||
|
if (excludedField === "auth") {
|
||||||
|
this.urlExcludes.auth = excluded;
|
||||||
|
this.urlExcludes.httpUser = excluded;
|
||||||
|
this.urlExcludes.httpPassword = excluded;
|
||||||
|
this.urlExcludes.bearerToken = excluded;
|
||||||
|
} else {
|
||||||
this.urlExcludes[excludedField] = excluded;
|
this.urlExcludes[excludedField] = excluded;
|
||||||
this.setRouteQueryState();
|
}
|
||||||
|
this.setRouteQueryState();
|
||||||
},
|
},
|
||||||
methodChange() {
|
methodChange() {
|
||||||
// this.$store.commit('setState', { 'value': ["POST", "PUT", "PATCH"].includes(this.method) ? 'application/json' : '', 'attribute': 'contentType' })
|
// this.$store.commit('setState', { 'value': ["POST", "PUT", "PATCH"].includes(this.method) ? 'application/json' : '', 'attribute': 'contentType' })
|
||||||
@@ -1545,7 +1552,10 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.urlExcludes = this.$store.state.postwoman.settings.URL_EXCLUDES || {
|
this.urlExcludes = this.$store.state.postwoman.settings.URL_EXCLUDES || {
|
||||||
// Exclude authentication by default for security reasons.
|
// Exclude authentication by default for security reasons.
|
||||||
auth: true
|
auth: true,
|
||||||
|
httpUser: true,
|
||||||
|
httpPassword: true,
|
||||||
|
bearerToken: true
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Object.keys(this.$route.query).length)
|
if (Object.keys(this.$route.query).length)
|
||||||
|
|||||||
Reference in New Issue
Block a user