Reputation: 1279
currently, I try to download a specific document with a csp rule that is activated as such:
default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src 'self'; font-src 'self'; frame-src 'self';img-src 'self' data:; object-src 'self';
How I can allow a specific file with this content-type (it's a pdf file):
text/html;charset=utf-8
Thanks in advance.
Best regards,
Upvotes: 0
Views: 694
Reputation: 8541
you can use "Content-Type", "application/pdf" if you are looking for a PDF type. If you are using JavaScript add below line,
this.Response.AddHeader("Content-Type", "application/pdf");
Upvotes: 0