开发者

How can I prevent cache/cookies from affecting the path of ckeditor javascript files in a production rails app?

开发者 https://www.devze.com 2023-02-08 22:59 出处:网络
I have a built a rails app in which I am using the ckeditor 3.5.1 together with the ckeditor gem. When running in development, everything works fine. But when I run in production, I get errors.Someti

I have a built a rails app in which I am using the ckeditor 3.5.1 together with the ckeditor gem.

When running in development, everything works fine. But when I run in production, I get errors.Sometimes, the text_area with the ckeditor does not show up. But when I clear my cache and cookies, everything works fine. Then after a while, the error comes up again. The error comes up more often than not.

Closer investigation reveals that when the error occurs, some files like staging.domain.com/javascripts/ckeditor/config.js are instead being requested from staging.domain.com/posts/config.js which is naturally non-existent (posts is from my Post model)

How can the ca开发者_StackOverflow社区che/cookies affect which path the files are served from? Does anyone know what else might be wrong and how I can fix it?

P.S. I am using Phusion passenger in production.


It would seem the problem was being cased by mod_pagespeed which was activated. By disabling it, everything came back to normal.

I am curious though, about how this was happening.

0

精彩评论

暂无评论...
验证码 换一张
取 消