2
0

request-between-growi-and-proxy.ts 541 B

1234567891011121314151617181920212223242526
  1. import type { Request } from 'express';
  2. export interface BlockKitRequest {
  3. // Block Kit properties
  4. body: {
  5. view?: string;
  6. blocks?: string;
  7. };
  8. }
  9. export type RequestFromGrowi = Request &
  10. BlockKitRequest & {
  11. // appended by GROWI
  12. headers: { 'x-growi-gtop-tokens'?: string };
  13. // will be extracted from header
  14. tokenGtoPs: string[];
  15. };
  16. export type RequestFromProxy = Request & {
  17. // appended by Proxy
  18. headers: { 'x-growi-ptog-token'?: string };
  19. // will be extracted from header
  20. tokenPtoG: string[];
  21. };