Skip to content
Merged
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
5 changes: 5 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ export async function loadConfig(cliOptions = {}, configFile = null) {
config.logger = false;
}

// Mashlib requires content negotiation for Turtle support
if (config.mashlib || config.mashlibCdn) {
config.conneg = true;
}
Comment on lines +232 to +234

Copilot AI Feb 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This unconditionally overrides explicit user settings for conneg. If a user explicitly sets --conneg=false, JSS_CONNEG=false, or "conneg": false in their config file, this code will override their choice. The auto-enable logic should only apply when conneg hasn't been explicitly configured by the user. Consider checking if conneg was explicitly set in cliOptions, envConfig, or fileConfig before auto-enabling it, or at minimum only enable it when the merged value is still false (the default).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review. In this case, --mashlib without conneg is a broken combination — mashlib requires Turtle content negotiation to function. Serving .ttl files as raw JSON-LD always causes parse errors.

This is an implicit dependency, similar to how --ssl-cert requires --ssl-key. There's no valid use case for --mashlib --no-conneg, so auto-enabling is the correct behavior.


// Validate SSL config
if ((config.sslKey && !config.sslCert) || (!config.sslKey && config.sslCert)) {
throw new Error('Both --ssl-key and --ssl-cert must be provided together');
Expand Down