Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ App.services.api = {
// X-Requested-With marks the call as programmatic for browsers without Sec-Fetch-Mode: the
// server then answers an expired session with a PLAIN 401 (no Basic challenge), so the
// browser's native login dialog never pops over a background poll.
const headers = { 'Accept': 'application/json', 'X-Requested-With': 'XMLHttpRequest' };
// A caller may pin the Accept header for THIS call ({ accept: 'text/plain' }) - e.g. the
// monitoring Logs page, whose file endpoint produces text/plain and answers 406 to a JSON-only
// Accept before the handler even runs. JSON stays the default.
const headers = { 'Accept': opts.accept || 'application/json', 'X-Requested-With': 'XMLHttpRequest' };
if (!isForm) headers['Content-Type'] = 'application/json';
// A caller may pin the request language for THIS call ({ language: 'bg' }) — e.g. Print, where the
// chosen print language must drive the multilingual data overlay, not the UI locale. Absent the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ window.MonitoringOps = (() => {
logFiles: () => get('/services/ide/logs/'),

/** One log file, whole. It is never polled - the page tails what it loaded. */
logFile: (file) => get('/services/ide/logs/' + encodeURIComponent(file)),
logFile: (file) => App.services.api.get('/services/ide/logs/' + encodeURIComponent(file), { ...ABSOLUTE, accept: 'text/plain' }),

/**
* Run a read that must not take the page down with it. A monitoring screen exists to show what is
Expand Down
Loading