Skip to content
  • rinpatch's avatar
    HTTP Security plug: rewrite &csp_string/0 · 455a402c
    rinpatch authored
    - Directives are now separated with ";" instead of " ;",
    according to https://www.w3.org/TR/CSP2/#policy-parsing
    the space is optional
    - Use an IO list, which at the end gets converted to a binary as
    opposed to ++ing a bunch of arrays with binaries together and joining
    them to a string. I doubt it gives any significant real world advantage,
    but the code is cleaner and now I can sleep at night.
    - The static part of csp is pre-joined to a single binary at compile time.
    Same reasoning as the last point.
    455a402c