Vars.pm 932 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package Trog::Vars;
  2. use strict;
  3. use warnings;
  4. use feature qw{signatures};
  5. no warnings qw{experimental};
  6. #1MB chunks
  7. our $CHUNK_SEP = 'tCMSep666YOLO42069';
  8. our $CHUNK_SIZE = 1024000;
  9. our %content_types = (
  10. text => "text/plain",
  11. html => "text/html",
  12. json => "application/json",
  13. blob => "application/octet-stream",
  14. xml => "text/xml",
  15. xsl => "text/xsl",
  16. css => "text/css",
  17. rss => "application/rss+xml",
  18. email => "multipart/related",
  19. );
  20. our %byct = reverse %Trog::Vars::content_types;
  21. our %cache_control = (
  22. revalidate => "no-cache, max-age=0",
  23. nocache => "no-store",
  24. static => "public, max-age=604800, immutable",
  25. );
  26. # NOTE: the post schema and its validators used to be duplicated here as well
  27. # as in Trog::DataModule, and filter() had no callers at all. Both are gone --
  28. # a post's shape is now an OpenAPIv3 schema, see Trog::DataModule::schema_for().
  29. 1;