I cannot access a local GitLab

When creating a new Project, the following error may appear:

Or when you want to open an existing Project, you may encounter the following error notification:


These errors may appear if you use a local GitLab self-managed: it does not define CORS headers, so browsers tend to block requests to this git provider.

To resolve this limitation, please configure one of the following solutions:

Then, use the Connection type GitLab self-managed in biGENIUS-X, a connection type that disables CORS headers.

Special configuration on GitLab self-managed

  • Find the gitlab.rb file from the gitlab installation (usually in /etc/gitlab/gitlab.rb).
  • Add the following line of code to this file:
nginx['custom_gitlab_server_config'] = “add_header ‘Access-Control-Allow-Origin’ ‘*’ always;\N add_header ‘Access-Control-Allow-Credentials’ ‘ true’ always;\N add_header ‘Access-Control-Allow-Methods’ ‘GET,HEAD,OPTIONS,POST,PUT’ always ; \add_header 'Access-Control-Allow-Headers' 'Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization, ngsw-bypass' always;\n”
  • Copy and paste the command:

echo “nginx[‘custom_gitlab_server_config’] = ‘add_header ’Access-Control-Allow-Origin‘ ’*‘ always;add_header ’Access-Control-Allow-Credentials‘ ’ true‘ always;add_header ’Access-Control-Allow-Methods‘ ’GET,HEAD,OPTIONS,POST,PUT' always ; \n add_header 'Access-Control-Allow-Headers' 'Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization, ngsw-bypass' always;\n“” >> /etc/gitlab/gitlab. rb
  • Restart the GitLab instance and wait for a successful restart:
gitlab-ctl reconfigure

Use the Chrome browser extension

  • If CORS HEADERS cannot be added to the GitLab self-managed installation, the user can also use a browser extension that defines the necessary headers.
  • Download this browser extension and unzip it in a local directory
  • Open Chrome Browser and open chrome://extensions/

  • Click on load unpacked extension and then navigate to unpacked extension.

  • Reload biGENIUS-X

With this solution, users can only use a Chrome browser with biGENIUS-X.