Additional Protocol Support

Create issue
Issue #17 resolved
kenton gray created an issue

We use postman for all of our REST testing which uses the chrome://[randomuuid] protocol. It is currently not possible to add chrome://* without an exception. That is because it is hardcoded for HTTP/HTTPS. I'd be happy to submit a pull request if you would like one.

https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en

Comments (4)

  1. kenton gray reporter

    Here is the stack: javax.servlet.ServletException: com.thetransactioncompany.cors.CORSConfigurationException: Bad origin URL in property cors.allowOrigin: chrome:// at com.thetransactioncompany.cors.CORSFilter.init(CORSFilter.java:130) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4638) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5294) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1568) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1558) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:695) Caused by: com.thetransactioncompany.cors.CORSConfigurationException: Bad origin URL in property cors.allowOrigin: chrome:// at com.thetransactioncompany.cors.CORSConfiguration.<init>(CORSConfiguration.java:305) at com.thetransactioncompany.cors.CORSFilter.init(CORSFilter.java:126) ... 14 more

  2. Vladimir Dzhuvinov

    Thank you reporting this.

    Which version of the CORS filter have you got? A while ago we added support for custom schemas, such as chrome://

    The current stable release is 1.9.2.

  3. Log in to comment