Allow custom GitLab endpoints for self-hosting #6399
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In some setups, self-hosting GitLab will require a different auth or tokenUrl than the baseUrl used to redirect the user to approve access. For example, there may be a firewall blocking WikiJS from accessing GitLab on the same server using the public baseUrl. This is the root of the problem I was facing here: #6377 .
This PR adds
authorizationURL
andtokenURL
as configuration options for the GitLab authentication strategy. This allows the baseUrl to be set to redirect the user for approval, but have WikiJS use an internal tokenURL for validation. These new options may be left empty and they will be calculated from baseUrl the way they currently are. This is a non-breaking change.