Replies: 3 comments 3 replies
-
|
@jlouvel and @thboileau Would you agree that this should not be enforced? // org.restlet.engine.header.HeaderUtils.java Or at least a way to override this. For example in our case that we are building a static site server with Restlet then this rule is not allowing a core function. |
Beta Was this translation helpful? Give feedback.
-
|
Yes, it's possible to set the headers via the standard API, but our use-case is different, as mentioned it's a web hosting platform. And websites have Which the platform does not forbid any value, so if it relies on the "standard" API then it could be filtered. |
Beta Was this translation helpful? Give feedback.
-
|
I'm still not 100% clear about the use case. Serving static files with Restlet is possible for example using the Directory class. If the goal is to allow custom setting of response headers on static files returned by Restlet, then you would need to override the ServerAdapter#addResponseHeaders(HttpResponse) method. To set a custom adapter, you need to call HttpServerHelper#setAdapter Hope this helps! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This code:
Is throwing this "error"
Is there a workaround?
Beta Was this translation helpful? Give feedback.
All reactions