Skip to content

Commit

Permalink
refactor: update URLs to use proxy if available
Browse files Browse the repository at this point in the history
- Update getAuthenticatedUser.js to use proxy URL if provided in the environment variable.
- Update getGeneralToken.js to use proxy URL if provided in the environment variable.
  • Loading branch information
Prioq committed Oct 21, 2024
1 parent 6e07dc3 commit 5538bac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/util/getAuthenticatedUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports.optional = ['jar']
exports.func = async function (args) {
const jar = args.jar
const httpOpt = {
url: '//users.roblox.com/v1/users/authenticated',
url: `//users.${process.env['PROXY'] || "roblox.com"}/v1/users/authenticated`,
options: {
method: 'GET',
followRedirect: false,
Expand Down
2 changes: 1 addition & 1 deletion lib/util/getGeneralToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function getGeneralToken (jar) {
}
const httpOpt = {
// This will never actually sign you out because an X-CSRF-TOKEN isn't provided, only received
url: '//auth.roblox.com/v2/logout', // REQUIRES https. Thanks for letting me know, ROBLOX...
url: `//auth.${process.env['PROXY'] || "roblox.com"}/v2/logout`, // REQUIRES https. Thanks for letting me know, ROBLOX...
options: {
resolveWithFullResponse: true,
method: 'POST',
Expand Down

0 comments on commit 5538bac

Please sign in to comment.