CMS Development

jmclaren
HubSpot Employee
HubSpot Employee

JS and HTML files in File Manager

The contentType header for JavaScript and HTML served from the default HubSpot File Manager CDN is changing.

 

What's happening?

We are changing the contentType used for JavaScript and HTML files served from HubSpot CDN domain in the File Manager. The contentType is changing to text/plain. This means when the browser goes to these URLs it will not render the HTML or process the javascript, it will display its code. This does not apply to File Manager files served through a connected domain name.

Files uploaded prior to this change will be unaffected to prevent breaking existing websites.

If you have an automation or business workflow that results in the upload of those types of files be aware you need to serve them through a connected domain.

Why is it happening?

This is a proactive security improvement to prevent illegitimate use of the File Manager that violates our terms of service.

When is it happening?

This change has already occurred.

Why the short notice?

The change does not break existing uploads. It is a preventative measure to improve the security of the HubSpot platform. We take steps every day to improve security and performance. This change we felt you should know about as there are some accounts storing these files in the File Manager.

Questions comments? let's talk about it in the developer forums.

Jon McLaren

Sr. CMS Developer Advocate

Get started developing on the HubSpot CMS Developer Changelog
How to optimize your CMS Hub site for speed

If my reply answered your question, please mark it as a solution, to make it easier for others to find.

0 Upvotes
0 Replies 0

0 Replies

No replies on this post just yet

No one has replied to this post quite yet. Check back soon to see if someone has a solution, or submit your own reply if you know how to help! Karma is real.

Reply to post

Need help replying? Check out our Community Guidelines