- Integrate AI functionality to optimize product titles
- Add AI optimization button in product add and edit pages
- Implement AI chat service for generating optimized titles
- Update backend to support AI optimization requests
- Add error handling and loading state for AI optimization process
- Add rate limiting functionality to the admin panel
- Implement rate limiting middleware to control API request frequency
- Update login controller to use rate limiting Add helper functions for getting IP and admin UID
- Update route configuration to include rate limiting middleware
- Add Redis configuration to .env file
- Update composer.json to include rate limiting package dependency
- Add try-catch block around ReflectionMethod usage
- Catch and ignore any Throwable that occurs during reflection
- Improve error handling and prevent potential fatal errors
- Rename $ignoreAuth to $ignoreLogin for better clarity
- Update comments for better code readability
- Modify Login controller to use $ignoreLogin instead of $ignoreAuth
- Add MiddlewareAnnotation to CheckLogin middleware for login exemption
- Implement IGNORE_LOGIN constant in MiddlewareAnnotation
- Use MiddlewareAnnotation in Goods controller for login exemption
Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
- Remove unused imports and annotations- Simplify annotation reading process
- Use ReflectionClass and ReflectionMethod directly-Handle annotations using getAttributes() method
- Improve code readability and performance
- Add APP_ADMIN_SYSTEM_LOG environment variable to control admin system logs
- Implement log switch check in SystemLog middleware
- Update .example.env file with new environment variable
- Remove redundant code for checking ignoreLog property
- Consolidate logic to check ignoreLog property in a single location
- Improve readability and maintainability of the code
Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
- Add 'ignoreLog' property to the Log controller to specify actions that should not be logged
- Implement logic in SystemLog middleware to check if the current action is in the ignoreLog list
- Skip logging for actions listed in ignoreLog, improving performance and reducing log clutter
Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
- Add log viewer functionality using wolf-leo/phplogviewer package
- Implement log record feature in admin system
- Update log table to include log record button
- Configure default and common log modules in logviewer config
Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
Implement a limitation on the amount of response content recorded in the system logs
to avoid excessively large entries. The response is now truncated to 3000 characters,
enhancing performance and readability while still capturing essential data.
Implement a limitation on the amount of response content recorded in the system logs
to avoid excessively large entries. The response is now truncated to 3000 characters,
enhancing performance and readability while still capturing essential data.
Change the type of the request parameter in middleware handle functions to use
app\Request instead of the plain $request. This update clarifies the expected
request object type for better type checking and autocompletion support.
Direct IP retrieval method has been updated to improve accuracy in the admin system log.
This change involves modifying the IP address retrieval logic from considering the
`HTTP_X_FORWARDED_FOR` header to directly using the `ip()` method, potentially enhancing
the security and reliability of IP logging.
After the admin session expires, the system now correctly redirects to the specified admin login URL, addressing the issue where the redirect would
sometimes point to an incorrect path.