Skip to content

Commit

Permalink
Merge pull request #6889 from luiseufrasio/FISH-9112-rest-link-redire…
Browse files Browse the repository at this point in the history
…ction-host-in-header

FISH-9112 : setting local Name and Port for /managment/domain URI
  • Loading branch information
luiseufrasio authored Aug 16, 2024
2 parents cff6396 + 28f9c0e commit 133d648
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@
* only if the new code is made subject to such option by the copyright
* holder.
*/
// Portions Copyright [2024] Payara Foundation and/or affiliates

package org.glassfish.admin.rest.adapter;

import org.glassfish.grizzly.http.server.Request;
import org.glassfish.grizzly.http.server.Response;
import org.jvnet.hk2.annotations.Service;

import org.glassfish.admin.restconnector.Constants;
Expand All @@ -55,4 +59,11 @@ public RestManagementAdapter() {
setRestResourceProvider(new RestManagementResourceProvider());
}

@Override
public void service(Request req, Response res) {
req.setServerName(req.getLocalName());
req.setServerPort(req.getLocalPort());
super.service(req, res);
}

}

0 comments on commit 133d648

Please sign in to comment.