Remove secrets from source code
parent
aab834bc10
commit
9caf8338fa
2
build.sh
2
build.sh
|
@ -2,7 +2,7 @@
|
|||
echo "Welcome!"
|
||||
|
||||
version="1.2.0"
|
||||
registryPass="***REMOVED***"
|
||||
registryPass="******************"
|
||||
|
||||
echo "Create docker image with version $version."
|
||||
docker image build -t "reverse-proxy-frontend:$version" .
|
||||
|
|
|
@ -4,8 +4,8 @@ echo "Welcome!"
|
|||
version="1.4.1"
|
||||
platform="linux/amd64,linux/arm64,linux/arm/v7"
|
||||
appSubfolder="/reverse-proxy"
|
||||
localRegistryPass="***REMOVED***"
|
||||
npmToken="***REMOVED***"
|
||||
localRegistryPass="******************"
|
||||
npmToken="******************"
|
||||
|
||||
echo "Login to alpine-nexus registry."
|
||||
docker login --username=admin --password=$localRegistryPass alpine-nexus:8500
|
||||
|
|
|
@ -14,7 +14,7 @@ Push image to registry:
|
|||
docker tag reverse-proxy-frontend:1.0.5 alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.5
|
||||
|
||||
--login to registry
|
||||
docker login --username=admin --password="***REMOVED***" alpine-nexus:8500
|
||||
docker login --username=admin --password="******************" alpine-nexus:8500
|
||||
|
||||
--push image
|
||||
docker push alpine-nexus:8500/reverse-proxy/reverse-proxy-frontend:1.0.5
|
||||
|
|
|
@ -4,7 +4,6 @@ function getHeaders() {
|
|||
const headers = new Headers();
|
||||
headers.append("Accept", "application/json");
|
||||
headers.append("Content-Type", "application/json");
|
||||
headers.append("Authorization", "Basic ***REMOVED***");
|
||||
headers.append("Accept-Language", `${i18next.language}`);
|
||||
return headers;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import i18next from "i18next";
|
|||
function getHeaders() {
|
||||
return {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: "Basic ***REMOVED***",
|
||||
"Accept-Language": `${i18next.language}`
|
||||
};
|
||||
}
|
||||
|
@ -12,15 +11,13 @@ function getHeaders() {
|
|||
function internalRequest(url, options) {
|
||||
return axios
|
||||
.request(url, options)
|
||||
.then((res) => res.data)
|
||||
.catch(function (error) {
|
||||
.then(res => res.data)
|
||||
.catch(function(error) {
|
||||
if (error.response && error.response.data) {
|
||||
throw (
|
||||
{
|
||||
throw {
|
||||
...error.response.data,
|
||||
message: error.response.data.detail || error.response.data.title
|
||||
} || error
|
||||
);
|
||||
} || error;
|
||||
}
|
||||
// The request was made but no response was received
|
||||
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
||||
|
|
Loading…
Reference in New Issue