diff --git a/docs/migration.txt b/docs/migration.txt index c09196d52..006fac569 100644 --- a/docs/migration.txt +++ b/docs/migration.txt @@ -275,3 +275,7 @@ to be called. Inventory adjust is also no longer done when an object is created from scratch. You will need to call onAdjustQuantityInCart manually. +WebGUI::URL +========================== +In WebGUI 8, URL handlers are now done as Plack middleware. See WebGUI::Middleware::Snoop and WebGUI::Middleware::WGAccess +for examples. diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original index d0cb89634..659ed06b9 100644 --- a/etc/WebGUI.conf.original +++ b/etc/WebGUI.conf.original @@ -974,22 +974,6 @@ "runOnLogout" : "", -# URL handlers are used to associate functionality with a URL via a regular expression. - -"urlHandlers" : [ - { "^/extras" : "WebGUI::URL::PassThru" }, -# { "^/icons" : "WebGUI::URL::PassThru" }, -# { "^/documentation/pdf" : "WebGUI::URL::PassThru" }, -# { "^/my-custom-application$" : "WebGUI::URL::PassThru" }, -# { "^/server-status$" : "WebGUI::URL::PassThru" }, -# { "^/perl-status$" : "WebGUI::URL::PassThru" }, - { "^/uploads/dictionaries" : "WebGUI::URL::Unauthorized" }, - { "^/uploads" : "WebGUI::URL::Uploads" }, - { "^/\\*give-credit-where-credit-is-due\\*$" : "WebGUI::URL::Credits" }, - { "^/abcdefghijklmnopqrstuvwxyz$" : "WebGUI::URL::Snoop" }, - { ".*" : "WebGUI::URL::Content" } - ], - # Content handlers are used to produce content from the content URL handler. # Note, these handlers are processed in the order listed. Do not change # unless you know what you're doing. diff --git a/share/upgrades/7.10.4-8.0.0/removeURLHandlers.pl b/share/upgrades/7.10.4-8.0.0/removeURLHandlers.pl new file mode 100644 index 000000000..f4eea19e1 --- /dev/null +++ b/share/upgrades/7.10.4-8.0.0/removeURLHandlers.pl @@ -0,0 +1,8 @@ +use WebGUI::Upgrade::Script; + +start_step "Removing URL Handlers from WebGUI Configuration files"; + +session->config->delete( 'urlHandlers' ); + +done; +