You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
544 B
18 lines
544 B
3 years ago
|
import {HTTPKernelModule} from "../HTTPKernelModule";
|
||
|
import {Request} from "../../lifecycle/Request";
|
||
3 years ago
|
import {Injectable} from "@extollo/di"
|
||
3 years ago
|
import {HTTPKernel} from "../HTTPKernel";
|
||
|
|
||
3 years ago
|
@Injectable()
|
||
|
export class PoweredByHeaderInjectionHTTPModule extends HTTPKernelModule {
|
||
3 years ago
|
public static register(kernel: HTTPKernel) {
|
||
3 years ago
|
kernel.register(this).after()
|
||
3 years ago
|
}
|
||
|
|
||
|
public async apply(request: Request) {
|
||
3 years ago
|
// FIXME make this configurable
|
||
|
request.response.setHeader('X-Powered-By', 'Extollo')
|
||
3 years ago
|
return request
|
||
|
}
|
||
|
}
|