jenkinsci / jenkinsci/workflow-support-plugin

[JENKINS-32192] Hyperlinks quietly fail when JenkinsLocationConfiguration incorrect

Open
#384 5 comments 0 reactions 0 assignees View on GitHub
component:workflow-support-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
23
Forks
75
PR merge metrics
No merged PRs in 30d

Description

When the Jenkins site is accessed via short name, e.g.: http://jenkins instead of http://jenkins.domain.tld, the "Click here to forcibly terminate running steps" link fails silently. Opening the developer tools in the browser and checking the console shows the following error in Chrome:

```
XMLHttpRequest cannot load http://jenkins.domain.tld:8080/job/${ProjectName}/branch/${BranchName}/9/term. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://jenkins:8080' is therefore not allowed access. The response had HTTP status code 405.

```

If this behavior can't be "fixed" (one could argue it's not broken), notifying the end-user of the error and referring them to the URL specified in the JENKINS_URL variable seems like a potential improvement.

---
Originally reported by bgshacklett, imported from: Hyperlinks quietly fail when JenkinsLocationConfiguration incorrect


  • status: Open
  • priority: Minor
  • component(s): workflow-support-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 4
  • imported: 20260601-173816

Raw content of original issue

When the Jenkins site is accessed via short name, e.g.: http://jenkins instead of http://jenkins.domain.tld, the "Click here to forcibly terminate running steps" link fails silently. Opening the developer tools in the browser and checking the console shows the following error in Chrome:



XMLHttpRequest cannot load http://jenkins.domain.tld:8080/job/${ProjectName}/branch/${BranchName}/9/term. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://jenkins:8080' is therefore not allowed access. The response had HTTP status code 405.


If this behavior can't be "fixed" (one could argue it's not broken), notifying the end-user of the error and referring them to the URL specified in the JENKINS_URL variable seems like a potential improvement.

  • environment: Jenkins ver. 1.642, Workflow Plugin 1.12

Contributor guide

Open the contributing guide

Research direction

Start by locating the code for the “Click here to forcibly terminate running steps” link and its use of JenkinsLocationConfiguration. Reproduce the failure when Jenkins is accessed through a short hostname rather than the configured Jenkins URL, using the reported browser console error as a guide. Done means termination works in this situation, or the user is clearly notified and referred to the URL specified by JENKINS_URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.