-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly ignore brotli encoding on server-side (#180)
- Loading branch information
1 parent
ceabf1f
commit 4a52bfd
Showing
3 changed files
with
39 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
<template> | ||
<div>session-{{ axiosSessionId }}</div> | ||
<div> | ||
<div>session-{{ axiosSessionId }}</div> | ||
<div>encoding-${{ axiosEncoding }}$</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
// This will be intentially shared across requests | ||
let reqCtr = 1 | ||
// This will be intentically shared across requests | ||
let reqCtr = 1 | ||
export default { | ||
async fetch ({ app, route }) { | ||
let doLogin = route.query.login !== undefined | ||
if (doLogin) { | ||
app.$axios.setHeader('sessionId', reqCtr++) | ||
} | ||
}, | ||
computed: { | ||
axiosSessionId () { | ||
return this.$axios.defaults.headers.common.sessionId | ||
export default { | ||
async fetch ({app, route}) { | ||
let doLogin = route.query.login !== undefined | ||
if (doLogin) { | ||
app.$axios.setHeader('sessionId', reqCtr++) | ||
} | ||
}, | ||
computed: { | ||
axiosSessionId () { | ||
return this.$axios.defaults.headers.common.sessionId | ||
}, | ||
axiosEncoding () { | ||
return this.$axios.defaults.headers.common['Accept-Encoding'] | ||
} | ||
} | ||
} | ||
} | ||
</script> | ||
</script> |