Skip to content

Commit 99c4f2f

Browse files
authored
refactor: pass down headers (#18)
* refactor: pass down headers * build: tweaks
1 parent 5e2793f commit 99c4f2f

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
# github-token: ${{ secrets.GITHUB_TOKEN }}
3333
- name: Release
3434
if: ${{ github.ref == 'refs/heads/master' && !startsWith(github.event.head_commit.message, 'chore(release):') && !startsWith(github.event.head_commit.message, 'docs:') }}
35-
shell: 'script -q -e -c "bash {0}" > /dev/null'
3635
env:
3736
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GH_TOKEN }}
3837
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

api/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* global fetch, Response */
22

33
export const config = {
4-
runtime: 'experimental-edge'
4+
runtime: 'edge'
55
}
66

77
const NODE_ENV = process.env.NODE_ENV
@@ -46,8 +46,8 @@ export default async request => {
4646

4747
return fetch(`${API_ENDPOINT}?${url.searchParams.toString()}`, {
4848
headers: {
49-
'x-api-key': API_KEY,
50-
accept: request.headers.get('accept')
49+
...request.headers,
50+
'x-api-key': API_KEY
5151
}
5252
})
5353
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
],
5050
"scripts": {
5151
"clean": "rm -rf node_modules",
52-
"contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
52+
"contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
5353
"lint": "standard-markdown README.md && standard",
5454
"postrelease": "npm run release:tags && npm run release:github",
5555
"prerelease": "npm run update:check && npm run contributors",

0 commit comments

Comments
 (0)