Skip to content

Commit

Permalink
Merge branch 'dev-proxy-improvements' into 'main'
Browse files Browse the repository at this point in the history
Improve dev proxying

See merge request reportcreator/reportcreator!564
  • Loading branch information
MWedl committed May 27, 2024
2 parents a364aa9 + 95ffb5f commit 6097e6e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions api/src/reportcreator_api/pentests/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ class PentestProjectAdmin(SimpleHistoryAdmin, BaseAdmin):
def link_findings(self, obj):
return admin_changelist_url('Findings of this project', 'pentests', 'pentestfinding', {'project_id': obj.id})

def link_sections(self, obj):
return admin_changelist_url('Sections of this project', 'pentests', 'reportsection', {'project_id': obj.id})

def link_project_type(self, obj):
return admin_change_url(obj.project_type.name, 'pentests', 'projecttype', obj.project_type.id)

Expand Down
11 changes: 9 additions & 2 deletions frontend/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,17 @@ export default defineNuxtConfig({
changeOrigin: false,
ws: true,
},

'/admin': 'http://api:8000',
'/admin': {
target: 'http://api:8000',
changeOrigin: false,
},
'/__debug__': {
target: 'http://api:8000',
changeOrigin: false,
},
'/static': {
target: 'http://api:8000',
changeOrigin: false,
bypass(req) {
if (['/static/logo.svg', '/static/logo-text.svg', '/static/favicon.ico'].includes(req.url!) || req.url!.startsWith('/static/pdfviewer/')) {
return req.url;
Expand Down

0 comments on commit 6097e6e

Please sign in to comment.