Updates for Zammad 6
This commit is contained in:
parent
60b82f6fb4
commit
73fdb6e5d1
6 changed files with 101 additions and 23 deletions
|
|
@ -15,12 +15,8 @@ export const ZammadWrapper: FC<ZammadWrapperProps> = ({
|
|||
hideSidebar = true,
|
||||
}) => {
|
||||
const router = useRouter();
|
||||
const [display, setDisplay] = useState("inherit");
|
||||
//const {
|
||||
// publicRuntimeConfig: { linkURL },
|
||||
// } = getConfig();
|
||||
const linkURL = "http://localhost:3000";
|
||||
const url = `${linkURL}/proxy/zammad${path}`;
|
||||
const [display, setDisplay] = useState("none");
|
||||
const url = `/proxy/zammad${path}`;
|
||||
console.log({ url });
|
||||
|
||||
return (
|
||||
|
|
@ -34,8 +30,6 @@ export const ZammadWrapper: FC<ZammadWrapperProps> = ({
|
|||
styles={{ display }}
|
||||
onLoad={() => {
|
||||
const linkElement = document.querySelector("iframe");
|
||||
// const baseElement = linkElement.contentDocument.createElement("base");
|
||||
// baseElement.href = `${linkURL}/proxy/zammad`;
|
||||
if (
|
||||
linkElement.contentDocument &&
|
||||
linkElement.contentDocument?.querySelector &&
|
||||
|
|
|
|||
|
|
@ -31,8 +31,10 @@ const checkRewrites = async (request: NextRequestWithAuth) => {
|
|||
|
||||
const linkBaseURL = process.env.LINK_URL ?? "http://localhost:3000";
|
||||
const zammadURL = process.env.ZAMMAD_URL ?? "http://zammad-nginx:8080";
|
||||
const leafcutterURL = process.env.LEAFCUTTER_URL ?? "http://leafcutter:3000";
|
||||
const metamigoURL = process.env.METAMIGO_URL ?? "http://metamigo:3000";
|
||||
const leafcutterURL = process.env.LEAFCUTTER_URL ?? "https://lc.digiresilience.org";
|
||||
const metamigoURL = process.env.METAMIGO_URL ?? "http://metamigo-frontend:3000";
|
||||
|
||||
console.log({ linkBaseURL, zammadURL, leafcutterURL, metamigoURL });
|
||||
|
||||
if (request.nextUrl.pathname.startsWith('/proxy/leafcutter')) {
|
||||
const headers = { 'X-Leafcutter-Embedded': "true" };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue