Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

Commit 04e00f6

Browse files
authored
Merge pull request #57 from PDOK/csp
fix: embed CSS/JS files to allow for strict CSP settings
2 parents 6933fec + 829c62d commit 04e00f6

File tree

7 files changed

+31
-6
lines changed

7 files changed

+31
-6
lines changed

assets/css/bootstrap.min.css

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/gomagpie.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
.navbar {
1313
background-color: var(--bs-blue);
1414
}
15+
.navbar .navbar-outputs {
16+
--bs-breadcrumb-divider: '|'
17+
}
1518
.navbar .breadcrumb .breadcrumb-item,
1619
.navbar .breadcrumb .breadcrumb-item a {
1720
color: var(--bs-white);

assets/css/swagger-ui.min.css

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/swagger-ui-bundle.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/swagger-ui-standalone-preset.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/engine/templates/layout.go.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
{{ end }}
3232

3333
<!-- css -->
34-
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
35-
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
34+
<link href="css/bootstrap.min.css" rel="stylesheet">
3635
<link href="css/gomagpie.css" rel="stylesheet">
3736

3837
<script>
@@ -108,7 +107,7 @@
108107
</ol>
109108
</nav>
110109

111-
<nav style="--bs-breadcrumb-divider: '|';" aria-label="switch language or format">
110+
<nav class="navbar-outputs" aria-label="switch language or format">
112111
<ol class="breadcrumb">
113112
{{ $languageSwitchCode := (i18n "LanguageSwitchCode") }}
114113
{{ if gt (len .Config.AvailableLanguages) 1 }}

internal/ogc/common/core/templates/api.go.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ <h1 class="title" id="title">{{ .Config.Title }} - OpenAPI {{ i18n "Specificatio
3434
Loading...
3535
</div>
3636

37-
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/swagger-ui@4.5.0/dist/swagger-ui.min.css">
37+
<link rel="stylesheet" type="text/css" href="css/swagger-ui.min.css">
3838
<link rel="stylesheet" type="text/css" href="css/swagger-ui-pdok.css">
3939

4040
<!-- Load Swagger -->
41-
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@4.5.0/swagger-ui-bundle.js" charset="UTF-8"></script>
42-
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@4.5.0/swagger-ui-standalone-preset.js" charset="UTF-8"></script>
41+
<script src="js/swagger-ui-bundle.js" charset="UTF-8"></script>
42+
<script src="js/swagger-ui-standalone-preset.js" charset="UTF-8"></script>
4343
<script>
4444
// Redefine existing Swagger components.
4545
//

0 commit comments

Comments
 (0)