Skip to content

Commit

Permalink
Remove the unneeded X-Api-Key header and populate all the environments
Browse files Browse the repository at this point in the history
It's not needed by foia's API and polydelta has not whitelisted it.
  • Loading branch information
mrclay committed Aug 14, 2023
1 parent cef64f1 commit ee9ce79
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions js/settings/cloud-gov.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const api = {
localApiBaseURL: '/api',
jsonApiBaseURL: 'https://dev-api.foia.gov/api',
requestApiBaseURL: 'https://dev-api.foia.gov/api',
wizardApiURL: 'https://dev-api.foia.gov/doj-foia/models/ZBA2ow0/predict',
// These are not secret, refer to https://github.com/18F/beta.foia.gov/tree/develop/docs/foia-api.md
jsonApiKey: '7aT5REJTpzjKoYKFuc9YIJLalHdYaif6ZqGkDPxG',
};
Expand Down
1 change: 1 addition & 0 deletions js/settings/ddev.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const api = {
localApiBaseURL: '/api',
jsonApiBaseURL: 'https://foia-api.ddev.site/api',
requestApiBaseURL: 'https://foia-api.ddev.site/api',
wizardApiURL: 'https://uat-api.foia.gov/doj-foia/models/ZBA2ow0/predict',
jsonApiKey: 'x-local-key-not-used',
};

Expand Down
1 change: 1 addition & 0 deletions js/settings/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const api = {
localApiBaseURL: '/api',
jsonApiBaseURL: 'https://dev-api.foia.gov/api',
requestApiBaseURL: 'https://dev-api.foia.gov/api',
wizardApiURL: 'https://dev-api.foia.gov/doj-foia/models/ZBA2ow0/predict',
// These are not secret, refer to https://github.com/18F/beta.foia.gov/tree/develop/docs/foia-api.md
jsonApiKey: '7aT5REJTpzjKoYKFuc9YIJLalHdYaif6ZqGkDPxG',
};
Expand Down
1 change: 1 addition & 0 deletions js/settings/forum-one.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const api = {
localApiBaseURL: '/api',
jsonApiBaseURL: 'https://api.main-bvxea6i-oafzps2pqxjxw.us-2.platformsh.site/api',
requestApiBaseURL: 'https://api.main-bvxea6i-oafzps2pqxjxw.us-2.platformsh.site/api',
wizardApiURL: 'https://uat-api.foia.gov/doj-foia/models/ZBA2ow0/predict',
// These are not secret, refer to https://github.com/18F/beta.foia.gov/tree/develop/docs/foia-api.md
jsonApiKey: '7aT5REJTpzjKoYKFuc9YIJLalHdYaif6ZqGkDPxG',
};
Expand Down
1 change: 1 addition & 0 deletions js/settings/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const api = {
localApiBaseURL: '/api',
jsonApiBaseURL: 'http://local-api.foia.doj.gov/api',
requestApiBaseURL: 'http://local-api.foia.doj.gov/api',
wizardApiURL: 'https://local-api.foia.gov/doj-foia/models/ZBA2ow0/predict',
jsonApiKey: 'x-local-key-not-used',
};

Expand Down
1 change: 1 addition & 0 deletions js/settings/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const api = {
localApiBaseURL: '/api',
jsonApiBaseURL: 'https://api.foia.gov/api',
requestApiBaseURL: 'https://api.foia.gov/api',
wizardApiURL: 'https://api.foia.gov/doj-foia/models/ZBA2ow0/predict',
// These are not secret, refer to https://github.com/18F/beta.foia.gov/tree/develop/docs/foia-api.md
jsonApiKey: 'mUPoczW5VDRQOvroK6srQIjEGc5xBP0KDHgE34fv',
};
Expand Down
1 change: 1 addition & 0 deletions js/settings/staging.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const api = {
localApiBaseURL: '/api',
jsonApiBaseURL: 'https://stg-api.foia.gov/api',
requestApiBaseURL: 'https://stg-api.foia.gov/api',
wizardApiURL: 'https://stg-api.foia.gov/doj-foia/models/ZBA2ow0/predict',
// These are not secret, refer to https://github.com/18F/beta.foia.gov/tree/develop/docs/foia-api.md
jsonApiKey: 'Ear1funbgPVsgIAvRDZQK4yHq1XrLnrgfUBJM0Su',
};
Expand Down
1 change: 0 additions & 1 deletion js/util/wizard_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export function fetchWizardPredictions(query) {
const polydeltaOptions = {
method: 'POST',
headers: {
'X-Api-Key': settings.api.jsonApiKey,
'Content-Type': 'application/json',
},
body: JSON.stringify({ input: [query] }),
Expand Down

0 comments on commit ee9ce79

Please sign in to comment.