Skip to content

Commit

Permalink
fix(front): fix cors policy
Browse files Browse the repository at this point in the history
  • Loading branch information
clabroche committed Feb 14, 2024
1 parent 4d72f1e commit 2ee35e1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
Binary file added fronts/app/src/assets/vscode-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion fronts/app/src/views/StackSingle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<a v-if="currentService.git && currentService.git.home" :href="currentService.git.home" target="_blank" title="Open git home"><i class="fab fa-github" aria-hidden="true"></i></a>
<a v-if="currentService.url" :href="currentService.url" target="_blank" title="Open service URL"><i class="fas fa-globe" aria-hidden="true"></i></a>
<a v-for="url in currentService.urls" :key="url" :href="url" target="_blank" :title="url"><i class="fas fa-globe" aria-hidden="true"></i></a>
<img v-if="currentService.rootPath" src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Visual_Studio_Code_1.35_icon.svg/240px-Visual_Studio_Code_1.35_icon.svg.png" alt="vscode icon" aria-hidden="true" title="Open in Visual Studio Code" @click="openInVsCode()"/>
<img v-if="currentService.rootPath" src="@/assets/vscode-icon.png" alt="vscode icon" aria-hidden="true" title="Open in Visual Studio Code" @click="openInVsCode()"/>
<i v-if="currentService.rootPath" class="fas fa-folder" aria-hidden="true" title="Open folder" @click="openFolder()"></i>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion servers/server/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ typings/

# next.js build output
.next
dist
dist
bin/public
10 changes: 10 additions & 0 deletions servers/server/bin/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ const args = require('../helpers/args');
bodyLimit: '100mb',
noGreetings: true,
staticController: pathfs.resolve(__dirname, 'public'),
helmetConf: {
crossOriginEmbedderPolicy: false,
crossOriginResourcePolicy: false,
contentSecurityPolicy: {
directives: {
'frame-src': ["'self'", 'clabroche.github.io'],
},
useDefaults: true,
},
},
onListening(server) {
const addr = server.address();
const port = typeof addr === 'string'
Expand Down
2 changes: 1 addition & 1 deletion servers/server/models/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class Service {
}
let healthy;
try { healthy = await this.health.check(this); } catch (error) {
console.error(`Service health failed:${error}`);
console.error(`Service health failed(${this.label}):${error}`);
}
if (!healthy && !this.crashed) {
this.crashed = true;
Expand Down

0 comments on commit 2ee35e1

Please sign in to comment.