mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #840: Correct API path resolution for secrets when BASE_PATH is configured
This commit is contained in:
@@ -48,7 +48,7 @@ $(document).ready(function() {
|
||||
$('#generate_keypair').click(function() {
|
||||
$('#new_keypair_modal').modal('show');
|
||||
$.ajax({
|
||||
url: '/api/secrets/generate-keys/',
|
||||
url: netbox_api_path + 'secrets/generate-keys/',
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
success: function (response, status) {
|
||||
@@ -75,7 +75,7 @@ $(document).ready(function() {
|
||||
function unlock_secret(secret_id, private_key) {
|
||||
var csrf_token = $('input[name=csrfmiddlewaretoken]').val();
|
||||
$.ajax({
|
||||
url: '/api/secrets/secrets/' + secret_id + '/',
|
||||
url: netbox_api_path + 'secrets/secrets/' + secret_id + '/',
|
||||
type: 'POST',
|
||||
data: {
|
||||
private_key: private_key
|
||||
|
Reference in New Issue
Block a user