Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
allgo
allgo
Commits
133ad4a0
Commit
133ad4a0
authored
Mar 17, 2020
by
BAIRE Anthony
Browse files
fix the generation of the job uri
the generation of the uri *must* take into account the reverse-proxy headers
parent
8c7b82a2
Pipeline
#128776
failed with stages
in 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
django/allgo/api/v1/views.py
View file @
133ad4a0
...
...
@@ -84,12 +84,13 @@ def jobs(request):
job
.
state
=
Job
.
WAITING
job
.
save
()
no_domain_url
=
reverse
(
'api:job'
,
kwargs
=
{
'pk'
:
job
.
id
})
path
=
reverse
(
'api:job'
,
kwargs
=
{
'pk'
:
job
.
id
})
response
=
{
"avg_time"
:
0
,
# legacy, not relevant anymore
"id"
:
job
.
id
,
"url"
:
request
.
build_absolute_uri
(
no_domain_url
)
,
"url"
:
get_base_url
(
request
)
+
path
,
}
return
JsonResponse
(
response
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment