Skip to content

Commit

Permalink
fix(const.ts): use window.location.protocol instead of hardcoded 'htt…
Browse files Browse the repository at this point in the history
…p' for concatPath function

This change ensures that the correct protocol (http or https) is used
based on the current window location. This makes the application more
secure and adaptable to different environments, as it will now correctly
handle both secure (https) and non-secure (http) connections.
  • Loading branch information
cybersiddhu committed Feb 9, 2024
1 parent 9ed0ea8 commit f38518b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/auth/src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type UserWithRoles = UserInfoResponse & {
}

const concatPath = reduce(
`http://${window.location.host}`,
`${window.location.protocol}://${window.location.host}`,
(accumulator: string, current: string) => `${accumulator}${current}`,
)

Expand Down

0 comments on commit f38518b

Please sign in to comment.