Skip to content

Move mailerlite resources internally to fix CORP errors #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 10, 2025

Conversation

danyeaw
Copy link
Contributor

@danyeaw danyeaw commented Feb 7, 2025

Internal Hosting of MailerLite Assets

Problem

Solution

  • Moved from using MailerLite's files, made updates to the html, CSS, and JavaScript that is now hosted internally in our codebase
  • Eliminates dependency on MailerLite's CORS configuration

This change should resolve the resource loading errors and restore full MailerLite functionality.

Other Chores

  • I also minified the js and css files to improve page load speed slightly
  • Bumped the PyScript version to the latest

Style

While making the change, I also updated the styling to better fit with the rest of the site:

Before:

image

After:

image image

Copy link
Contributor

@WebReflection WebReflection left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beside the nit (not so important, rather curious) I see the index.html lost a lof of CSS code, including code that looks produced by TailwindCSS or similar tools, such as #mlb2-17564783.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody and similar ... if you can confirm that is intentional and everything looks fine with these changes in (appreciated, 'cause the cleanup is quite huge) feel free to merge, thanks.

@danyeaw
Copy link
Contributor Author

danyeaw commented Feb 10, 2025

Hi @WebReflection, the mlb2-... stuff was copy and pasted from MailerLite's setup instructions. I renamed it to newsletter when I moved it internally to make the CSS more clear and manageable.

@WebReflection
Copy link
Contributor

@danyeaw awesome then! feel free to merge or maybe make the JS also absolute with a starting / path and then merge, either works with the current setup anyway, I just found it odd CSS is absolute, JS is not but also, here it doesn't matter, it would if we move that folder in a subfolder, if ever.

@danyeaw
Copy link
Contributor Author

danyeaw commented Feb 10, 2025

@WebReflection I do not have merge permissions :)

@WebReflection WebReflection merged commit ae7c715 into pyscript:main Feb 10, 2025
@danyeaw danyeaw deleted the fix-mailerlite-cross-origin branch February 10, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants