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
import {HTTPKernelModule} from "../HTTPKernelModule";
|
|
import {Request} from "../../lifecycle/Request";
|
|
import {Injectable} from "@extollo/di"
|
|
import {HTTPKernel} from "../HTTPKernel";
|
|
|
|
@Injectable()
|
|
export class PoweredByHeaderInjectionHTTPModule extends HTTPKernelModule {
|
|
public static register(kernel: HTTPKernel) {
|
|
kernel.register(this).after()
|
|
}
|
|
|
|
public async apply(request: Request) {
|
|
// FIXME make this configurable
|
|
request.response.setHeader('X-Powered-By', 'Extollo')
|
|
return request
|
|
}
|
|
}
|