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

[engine] Add support for POST method in ComponentRenderController #1676

Closed
sumerjabri opened this Issue Dec 6, 2017 · 1 comment

Comments

@sumerjabri
Member

sumerjabri commented Dec 6, 2017

Per our email conversation.

Consider the community member code:

/opt/crafter/2.5.x/engine>git diff
diff --git a/src/main/java/org/craftercms/engine/controller/ComponentRenderController.java b/src/main/java/org/craftercms/engine/controller/ComponentRenderController.java
index a0b105e..b39e120 100644
--- a/src/main/java/org/craftercms/engine/controller/ComponentRenderController.java
+++ b/src/main/java/org/craftercms/engine/controller/ComponentRenderController.java
@@ -41,7 +41,7 @@ public class ComponentRenderController {
         this.renderComponentViewName = renderComponentViewName;
     }
 
-    @RequestMapping(method = RequestMethod.GET)
+    @RequestMapping(method = {RequestMethod.GET, RequestMethod.POST})
     protected ModelAndView render(@RequestParam("path") String path) throws Exception {
         return new ModelAndView(renderComponentViewName, COMPONENT_PATH_MODEL_NAME, path);
     }
@avasquez614

This comment has been minimized.

Show comment
Hide comment
Member

avasquez614 commented Dec 12, 2017

@sumerjabri sumerjabri closed this Dec 18, 2017

Crafter CMS v3.0.x automation moved this from Backlog to Completed Dec 18, 2017

@sumerjabri sumerjabri added this to Completed in Crafter CMS v2.5.x Aug 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment