Replies: 8 comments
-
Sure, in the most simple case one could add a method that plugins can call for registering headers that should be added in any case. Care must be taken to correctly cover the cases where the response object is thrown as an exception. |
Beta Was this translation helpful? Give feedback.
-
Maybe not applicable anymore - please have a look at it again and if it is, decide what to do (or whether to just keep this in the pipe for now, again). |
Beta Was this translation helpful? Give feedback.
-
Yes, the template Redirect.tt can be removed. |
Beta Was this translation helpful? Give feedback.
-
The header X-UA-Compatible is set to IE=edge,chrome=1 in C< _AddHeadersToResponseObject> . I think that this header can be removed, as very old Microsoft Browser are no longer supported. |
Beta Was this translation helpful? Give feedback.
-
I think I like the idea of supporting middlewares that can be managed by OTOBO. Kind of like Postmaster filters. I'll take a look at it. |
Beta Was this translation helpful? Give feedback.
-
Converted this to a discussion as there are no tangible TODOs. |
Beta Was this translation helpful? Give feedback.
-
Sounds sensible, low priority. |
Beta Was this translation helpful? Give feedback.
-
While developing a module I encountered some places in the code which, imho, could be made more similar, and I found a file which I think is not needed anymore. I'm not sure with anything on the first glance, though:
In Kernel/Output/HTML/Layout.pm we have the
sub _AddHeadersToResponseObject
which is used at several places, to set the Headers of the response:otobo/Kernel/Output/HTML/Layout.pm
Lines 1666 to 1667 in a74cb98
This is not done for
sub Attachment
though, I assume because here the headers differ quite a bit from the standard headers set in the above subroutine. Neither forsub Redirect
, where we do not even useKernel::System::Web::Response
, but directlyPlack::Response->new();
, because we normally do not set any extra headers.Both is fine in itself, I guess, but I e.g. was just adding a custom header used for logging, which should be added to every response, and now had to add it at three different places, one time on a different object, and I think it would be nice to have this more aligned. Also to have an easier to follow path for other developers. Priority is not high, though, and maybe something is also speaking against it?
Another question to this: Kernel/Output/HTML/Templates/Standard/Redirect.tt should not be needed anymore - is it?
Beta Was this translation helpful? Give feedback.
All reactions