sameersbn / sameersbn/docker-gitlab

When running on different port(not 443) some resources are missing the port

Open
#2,298 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
8.1k
Forks
2.1k
Avg merge
17h 47m
Merged PRs (30d)
7

Description

I didn't want to run my gitlab on standard port(to avoid nosy scanners) and for most parts it is working. However, I noticed that some views, like repository view, fires of graphql request when page loads and that fails because it is missing port number.
Similarly, some links in the <head> are missing port number, like this one below:
<link as="style" href="https://gitlab.myhostnamehere.net/assets/highlight/themes/white-b3993639b265e6a0de95d667365bc0dc4a707b70202945298c5715dc0d1f6159.css" rel="preload">

Browser console shows following messages for these resources:

Refused to load the stylesheet 'https://gitlab.myhostnamehere.net/assets/application-52560ba2603619d2ff1447002a60dcb62c7c957451fb820f1894e1ce7c23821c.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline'". 
Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

Refused to load the stylesheet 'https://gitlab.myhostnamehere.net/assets/highlight/themes/white-b3993639b265e6a0de95d667365bc0dc4a707b70202945298c5715dc0d1f6159.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline'". 
Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue mentions repository-view GraphQL requests and stylesheet links in the ; start by reproducing GitLab behind a non-443 port and tracing how those URLs are generated. Done means the generated resource URLs and GraphQL endpoint retain the configured port and load without the reported CSP failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
infrastructure, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.