Codebase attribute in manifest mismatch when testing local

五迷三道 提交于 2019-12-06 05:16:15

There's a few ways to approach this:

  1. Use multiple codebase attributes:

    You can supply multiple values to the Codebase attributes, thus allowing you to add local addresses as well.

    e.g: Codebase: myproductiondomain.com localhost 127.0.0.1

  2. Use Wildcards:

    You can also use a wildcard attribute in the Codebase attribute, which can have multiple forms:

    • e.g. Codebase: 127.0.0.1 (beware, that doesn't allow you to use localhost!!)
    • e.g. a much more lenient Codebase: *
  3. Build Changes:

    But more likely, you should modify your build system to produce a test and a production version using different Codebase attributes to prevent abuse.

Everything you need is in Preventing RIAs from being Repurposed:

Pay extra attention to that fun tidbit in the table of accepted wildcard saying, for the 127.0.0.1 entry:

Does not Match [...] http://localhost

Philippe Franklin

I've added an answer on how to automatically add those missing attributes as part of Netbeans build process.

It's a method that works with JavaFX, but it could give you some ideas: https://stackoverflow.com/a/19014303/2382937

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!