mirror of
https://github.com/Luzifer/browserphone.git
synced 2024-11-09 14:20:04 +00:00
Add auth to capability token URL
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
d7a753d70a
commit
8561eed3f8
3 changed files with 8 additions and 2 deletions
1
dist/index.html
vendored
1
dist/index.html
vendored
|
@ -16,6 +16,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script>
|
<script>
|
||||||
|
window.capabilityTokenAuth = '{{ env `CAP_TOKEN_AUTH` }}'
|
||||||
window.capabilityTokenURL = '{{ env `CAP_TOKEN_URL` }}'
|
window.capabilityTokenURL = '{{ env `CAP_TOKEN_URL` }}'
|
||||||
</script>
|
</script>
|
||||||
<script src="app.js"></script>
|
<script src="app.js"></script>
|
||||||
|
|
|
@ -138,7 +138,11 @@ export default {
|
||||||
this.phone.device.destroy()
|
this.phone.device.destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
axios.get(config.capabilityTokenURL)
|
axios.get(config.capabilityTokenURL, {
|
||||||
|
headers: {
|
||||||
|
authorization: `Bearer ${config.capabilityTokenAuth}`,
|
||||||
|
},
|
||||||
|
})
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
this.phone.device = new Device(resp.data.token, opts)
|
this.phone.device = new Device(resp.data.token, opts)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
export default {
|
export default {
|
||||||
|
capabilityTokenAuth: window.capabilityTokenAuth,
|
||||||
capabilityTokenURL: window.capabilityTokenURL,
|
capabilityTokenURL: window.capabilityTokenURL,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue