mirror of
https://github.com/Luzifer/browserphone.git
synced 2024-11-08 13:50:05 +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>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
window.capabilityTokenAuth = '{{ env `CAP_TOKEN_AUTH` }}'
|
||||
window.capabilityTokenURL = '{{ env `CAP_TOKEN_URL` }}'
|
||||
</script>
|
||||
<script src="app.js"></script>
|
||||
|
|
|
@ -138,7 +138,11 @@ export default {
|
|||
this.phone.device.destroy()
|
||||
}
|
||||
|
||||
axios.get(config.capabilityTokenURL)
|
||||
axios.get(config.capabilityTokenURL, {
|
||||
headers: {
|
||||
authorization: `Bearer ${config.capabilityTokenAuth}`,
|
||||
},
|
||||
})
|
||||
.then(resp => {
|
||||
this.phone.device = new Device(resp.data.token, opts)
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default {
|
||||
capabilityTokenAuth: window.capabilityTokenAuth,
|
||||
capabilityTokenURL: window.capabilityTokenURL,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue