Skip to content

Commit

Permalink
🐛 fix(index): Add X-RapidAPI-Host header to request (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvatelot authored Dec 9, 2022
1 parent 0a9c6f8 commit 72cf57c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ const fs = require("fs");
const axios = require("axios");

try {
const rapidApiUrlHost = 'openapi-provisioning.p.rapidapi.com';
const rapidApiUrl =
"https://openapi-provisioning.p.rapidapi.com/v1/apis/" +
"https://" + rapidApiUrlHost + "/v1/apis/" +
core.getInput("rapidapi-api-id");
const serverDefaultUrl = core.getInput("default-server-url");
const fileName = core.getInput("openapi-file");
Expand All @@ -27,6 +28,7 @@ try {
url: rapidApiUrl,
headers: {
'X-RapidAPI-Key': core.getInput("rapidapi-key"),
'X-RapidAPI-Host': rapidApiUrlHost,
...data.getHeaders()
},
data: data
Expand Down
2 changes: 1 addition & 1 deletion node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rapidapi-doc-update",
"version": "1.3.0",
"version": "1.3.1",
"description": "Github action to auto update RapidAPI OpenAPI documentation",
"main": "index.js",
"repository": "[email protected]:vvatelot/rapidapi-openapi-github-action.git",
Expand Down

0 comments on commit 72cf57c

Please sign in to comment.